This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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 188.8.131.52. 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 184.108.40.206 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 ]