Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java RMI: Connection refused

807580Dec 20 2007 — edited Sep 20 2010
I'm trying to create a client/server application in Java RMI. I have to machines:

Machine 1 (M1): Linux Ubuntu 7.10
Machine 2 (M2): Windows XP

In my server application I set this RMI-service with something like:
java.rmi.registry.LocateRegistry.createRegistry(1099);
Naming.rebind("rmi://localhost/totalizator/Class", myClass);
And in client application I connect by using something like:
myClass = (myClassInterface) Naming.lookup("rmi://192.168.1.35/totalizator/Class");
When I set M2 to server and try to connect from M1 everything works well. First time I start the server on M2, Windows Firewall ask me for accept or deny this service. But when I set M1 to server and try to connect from M2 I get this exception:
java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
        java.net.ConnectException: Connection refused: connect
From M2 I try to use "Telnet 192.168.1.34 1099" to verify that access to RMI - but no errors here.
Therefore I think that I have a security problem on my Ubuntu Linux system. I hope somebody can help me with this?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2010
Added on Dec 20 2007
16 comments
7,118 views