Oddities in Server Connection
843793Aug 28 2008 — edited Aug 28 2008I have launched an rmi server using an ssh client (PuTTY), and used port 51011 for access to both the registry and the remote stub.
Using the command:
telnet <hostname> 51011
through an outside computer invariably works, however about half of the time when attempting to
perform either registry.lookup(<name>) or <Remote interface>.<remote method> from the client
throws the commonly encountered exception:
java.rmi.ConnectException: Connection refused to host: <hostname>; nested exception is: ...
Caused by: java.net.ConnectException: Connection refused: connect
...
Note the registry was obtained from the non-default port specified above. Also note that all traffic going in an out of any port
funnels through port 22 where encryption takes place.
The other half of cases yields a consistent, robust connection (a thread continuosly requests data from the host).
I'm also quite sure the remote references in the server were not gc'd since they are held by static identifiers and that in one instance, when
i try to connect, the connection would fail, but in the subsequent instance, it would work again, and so on..