Skip to Main Content

Java APIs

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!

RMI - Connection refused to host: 127.0.0.1

843793Jul 8 2009 — edited Jul 8 2009
Hello,

Let me just first say I am new to RMI. I managed to create a test RMI application (Client/Server) in CentOS Linux that works successfully. I am trying to port the client to work from a remote computer in our LAN.

The problem I am getting is following: Client exception: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused

I have tried numerous suggestions from this forum as well as other sources on the internet, and nothing appears to work.

I find the connection refused message strange because it only occurs when I try to access the stub object, but allows me to lookup the stub from the host?
Registry registry = LocateRegistry.getRegistry(ipAddress);
ClassName stub = (ClassName)registry.lookup("ClassName");

stub.getValue(); // Causes Error
Any other suggestions would be greatly appreciated... thank you in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 5 2009
Added on Jul 8 2009
2 comments
510 views