| Author |
RMI app - java.rmi.ConnectException
|
Lukas Stephienn
Ranch Hand
Joined: Dec 23, 2005
Posts: 60
|
|
Hi I built an app based on RMI. Client (which is applet) connects to a server and sends it's own stub so the server could also invoke client methods. Everything works fine as long as client machine has public IP. But when he has not: java.rmi.ConnectException: Connection refused to host: <here is client IP>; nested exception is: java.net.ConnectException: Connection timed out at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574) at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94) ... This exception occurs when server for the first time tries to invoke remote method of the client. Is there any solution for this problem? Thanks in advance.
|
SCJP 5.0 (91%), SCBCD 1.3 (94%), SCWCD 1.4 (88%)
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
|
Sun's RMI FAQ has a section on workarounds for firewalls.
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
 |
|
|
subject: RMI app - java.rmi.ConnectException
|
|
|