This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Distributed Java and the fly likes RMI freezes on Naming.lookup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI freezes on Naming.lookup" Watch "RMI freezes on Naming.lookup" New topic
Author

RMI freezes on Naming.lookup

Nuno Miguel Santos
Greenhorn

Joined: Nov 01, 2011
Posts: 10
Hello everyone, I've recently started having a distributed systems course on my university, so I'm still fresh on this area. I've been trying some examples, and they work fine in just one PC. The problem started when I tried running the program on 2 separate PCs. Which doesn't work.. Here's the situation:

I've got this on my main method in my Client class:



That ip address is from a friend living in the same house as I. ( the ip is IPv4 from the command ipconfig on windows)

The Naming.lookup doesn't launch an exception, it just stays stucked there

the newUser method just does a println() so that I know the method was called.

Cheers.
Chris Janicki
Greenhorn

Joined: Aug 30, 2006
Posts: 21

The first step is to verify network connectivity. (Your app will hang for several minutes before timing out if it can't reach the IP address.) So try ping first. If that works, then try to telnet to the RMI port (default is 1099) on the remote pc. telnet <remotePcAddress> 1099

If that telnet connects, then you have the necessary access. Note that you probably won't see any content-- you're just looking to "connect" to the RMI registry's port in this test. If you do connect, then try reading my post here for more troubleshooting ideas: RMI Tips

If you can't ping and connect via telnet, then you'll need to figure out your network problem, which may be out of your control in the end, due to your school's firewalls, etc. However, it may be as simple as opening port 1099 on your remote PC's firewall. But first, try running the telnet on the remote machine itself, to verify that the RMI Registry is indeed running. If you can't connect there, but really believe that the RMI Registry is running, then try telnet 127.0.0.1 1099 That special address is the loopback address, which will talk to itself (the local PC), but without going through your network card or any firewall (I'm pretty sure). If that connects, then you definitely have a firewall issue on the local PC.
 
Consider Paul's rocket mass heater.
 
subject: RMI freezes on Naming.lookup