Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oddities in Server Connection

843793Aug 28 2008 — edited Aug 28 2008
I 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..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 25 2008
Added on Aug 28 2008
6 comments
98 views