error with JRMP connection establishment

Sidd picture Sidd · Jan 15, 2013 · Viewed 43.5k times · Source

I am getting following exception trace :

java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
    java.net.SocketTimeoutException: Read timed out
    at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:293)
    at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:190)

I read some forums on this but not getting clarity on the root cause of this exception. Is this due to one of the following reasons?

  1. Insufficient memory.
  2. RMI calls getting failed due to increased number of requests to the server causing one of them to wait and causing time outs for this request to process.
  3. Incompatible jre version or anything related to JRE version.
  4. Any networking related issue.
  5. Firewall related.

Answer

user207421 picture user207421 · Jan 15, 2013
  1. Insufficient memory.

Not at the client. Possibly at the server, if it causes a failure to allocate a thread for example.

  1. RMI calls getting failed due to increased number of requests to the server causing one of them to wait and causing time outs for this request to process.

No. The error occurs during the connection establishment phase, long before the server-side method implementation gets invoked.

  1. incompatible jre version or anything related to JRE version.

No.

  1. Any networking related issue.

Yes.

  1. Firewall related.

No. That would cause a connect timeout, or in certain obsolete cases a connection refusal, not a read timeout.