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.
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.