This happens when a Remote Method is Invoked. Interestingly the application successfully looksup that is gets the remote objects reference Does anyone know why this exception occurs ? Is it at server and or client end? The server has no firewall running so I dont see a practical reason for a connection time out as the client can retrieve remote reference successfully. Thank you Mehmet
Hi Mehmet, Do you really mean "over the internet"? Or do you mean over a local area network? The reason I ask is that the 192.168.1.0/255.255.255.0 subnet is the class C private network address subnet, and is not routable over the internet. Regards, Andrew
Hi Andrew I mean WAN not LAN. So I start the server with the current WAN IP adress of his. Thats the same IP which client tries to connect to. I know 192.168.0.1 is not routable but it can be assigned and used locally. My guess is, upon connection RMI resolves the local IP of the server and attempts to gain access to it ? I am trying to launch the server on another puter and have run in to problems again. This puter is connected to internet via a router. Whenever I attempt to start the server with the WAN IP , I am getting an error like this :
where 192.168.1.1 is the default gateway ,that is the routers local IP adress. Did anyone test his application over WAN where his server was behind a router ? Last of all, as my application seems working on localhost and testing it on two different computers turned out to be too troublesome does it hurt to give up on it ? Did anyone submit his/her application without testing it over WAN and passed anyway ? Your suggestions/experiences will be appreciated Regards Mehmet
author and jackaroo
Last of all, as my application seems working on localhost and testing it on two different computers turned out to be too troublesome does it hurt to give up on it ? Did anyone submit his/her application without testing it over WAN and passed anyway ?
Yes, I passed with only testing it on a LAN. Many people here pass without even testing on a LAN. I have been considering adding two items to the FAQ: "can I submit without testing on other platforms", and "can I submit without testing connection from a separate machine". By default, the rmiregistry appears to ignore the ipaddress in the server registration string, and just gives out the local ip address (which is non routable). To get around this, you could try using the following parameter on your command line of your server:
Changing the "chatsubo.javasoft.com" to whatever your publically accessible hostname or IP address is. Without this parameter, I was getting the same problem as you when connecting over a WAN: failure to connect to the private IP address. Once I put this parameter in, everything worked fine. This hint came from the "RMI Through Firewalls Via Proxies" page. Since this parameter needs to be set for the server only, you should be able to set it programattically before registering your server with the rmiregistry. However I don't think you need to go to that level of detail - people have been submitting without this "fix" for years and passing. Regards, Andrew