Connection time out when running Client and Server on different machines
manveer <[email protected]> Wed, 11 Feb 2009 22:57:45 -0800
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Hello
I am writing a simple RMI Calculator program, given at following URL
http://java.sun.com/developer/onlineTraining/rmi/RMI.html#RMISoftwareInstallation
First I tried to run this program on Macbook, running osx version 10.4.11
with java version "1.5.0_16". As much I have gathered from reading RMI
tutorials, we don't need to run rmic on the classes to generate the stub and
skeleton classes for java version 1.5 and higher. After running the
CalculatorServer (after starting the rmiregistry ofcourse) on one terminal
and CalculatorClient on other, CalculatorServer program terminated on its
own without any error/exception and CalculatorClient program terminated
giving following exception:
RemoteException
java.rmi.ConnectIOException: Exception creating connection to: 10.13.22.19;
nested exception is:
java.net.NoRouteToHostException: connect timed out: 10.13.22.19
Now I ran the same program on different machine, a ubuntu machine running
java version "1.6.0_07". When the server and client were ran on the same
machine everything went fine and I was able to run it. However, when I tried
to run client on other machine I received following error:
RemoteException
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested
exception is:
java.net.ConnectException: Connection refused
I dont know the reason client was trying to connect to the localhost when I
had specified the IP address of the server in the CalculatorClient.java.
Any help on this would be welcome.
Thanks,
Manveer
PS: I'm sorry if this post is received multiple times, I tried posting it on
rmi-users list but the list was moderated and I haven't received any
confirmation of accepting of the post.
--
View this message in context: http://www.nabble.com/Connection-time-out-when-running-Client-and-Server-on-different-machines-tp21970853p21970853.html
Sent from the Java - RMI mailing list archive at Nabble.com.
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS". For general help, send email to
[email protected] and include in the body of the message "help".
For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html
To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html