I am getting a sporatic 'java.net.ConnectException: Connection refused' exception in an rmi method call. (FYI my use of rmi is vanilla and very simple.) The only clue I've found in the exception (see below) is a 'at $Proxy2.isLocked(Unknown Source)' line. I wonder if the problem has something to do with an rmi property. I am explicitly setting the following properties.
System.setProperty("sun.rmi.transport.connectionTimeout","60000");
System.setProperty("sun.rmi.transport.tcp.handshakeTimeout","120000");
I'd appreciate any thoughts on this. It's difficult to debug, since it appears to be something in the rmi itself.
thanks
My exception:
192.168.1.103; nested exception is:
java.net.ConnectException: Connection refused
at laph.trd.sim.SimRunner.runTasks(SimRunner.java:118)
at laph.trd.sim.SimRunner.volaRun0(SimRunner.java:232)
at laph.trd.sim.SimRunner.main(SimRunner.java:243)
Caused by: java.rmi.ConnectException: Connection refused to host: 192.168.1.103; nested exception is:
java.net.ConnectException: Connection refused
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
at $Proxy2.isLocked(Unknown Source)
at zeedonk.Zeedonk.runTask(Zeedonk.java:290)
at laph.trd.sim.SimRunner.runTasks(SimRunner.java:88)
... 2 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at java.net.Socket.connect(Socket.java:469)
at java.net.Socket.<init>(Socket.java:366)
at java.net.Socket.<init>(Socket.java:179)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
... 10 more