I have an RMI server running on a local machine within a wireless network.
I bind this server to the RMI registry with this call,
This binds the server to the local area network (the wireless router) via the local IP address the router provides for this particular machine, which is 192.168.123.103.
Say, my WAN ip address (provided by the ISP) is 220.127.116.11. I set-up a virtual server in the router so that any calls to the WAN ip address on port 1099, will be directed to port 1099 of the local machine, ip= 192.168.123.103.
In my client I connect to the server with the following call,
It works great when the client is within the local network. However, when I try to connect outside of the local network, I have problems. It looks like the client finds the server and makes a connection. However, when I try to make a remote method call, I get the following exception:
java.rmi.ConnectException: Connection refused to host: 192.168.123.103; nested exception is: java.net.ConnectException: Connection timed out: connect at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:567) at sun.rmi.transport.tcp.TCPChannel.createConnection..............
I think there is a disconnect between the clients connection to 18.104.22.168 the (WAN IP) and the (LAN IP) 192.168.123.103.
I don't think it is my java.policy file, as I grant access to all, also, I have opened port 1099 in the firewall.
Has anybody experienced this? Thanks in advance, for your help.
-D [ January 20, 2005: Message edited by: David Moran ]