GeeCON Prague 2014*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes ConnectIOException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "ConnectIOException" Watch "ConnectIOException" New topic
Author

ConnectIOException

harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
hi all,
i am unable to look up the remote object , when i get to Naming.lookup(), i got ConnectIOException has been thrown.Please throw a idea on it
kanwal
Rick Fortier
Ranch Hand

Joined: Jun 04, 2001
Posts: 147
Did you start the rmiregistry? Did you register the interface?
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
thanks for the answer Rick , i woke up late today
thanks for the reply rick,
yes the rmiregistry was running on separate shell window, also registered the remote objec successfully to the registry. The Lookup method is failing , spits the following exception.
Naming.lookup("//localhost/tester");
java.rmi.ConnectException: Connection refused to host: 10.10.0.12; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused

[This message has been edited by harcharan kanwal (edited August 01, 2001).]
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
now the problem started at begining ,when i am trying to bind the object
Naming.rebind("tester",dataBaseInterface);
and get the following exception
ava.rmi.ConnectException: Connection refused to host: 10.10.0.12; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
harcharan kanwal
Ranch Hand

Joined: Jul 02, 2001
Posts: 64
problime solved with changing /etc/hosts file
we have dhcp assigning ip adresses .commenting out the ip address assigned to my name in the hosts file did the trick for right now.
 
GeeCON Prague 2014
 
subject: ConnectIOException