14

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.
Farvardin
  • 5,336
  • 5
  • 33
  • 54
Sidd
  • 313
  • 2
  • 3
  • 10
  • Maybe yes. Try to eliminate some of them by making experiments. – Henry Jan 15 '13 at 06:25
  • Which one of the above options best relates to the cause of exception?Any idea on this? – Sidd Jan 15 '13 at 06:32
  • Hard to say without more information. Do you always get this error or does it sometimes work? Can you ping the remote machine? – Henry Jan 15 '13 at 06:36

3 Answers3

3
  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.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • It could certainly be firewall related. Not all firewalls work the same way. I know it makes much more sense to block the connection, but I've seen plenty of cases where firewalls allow a connection and then block the traffic. – davmac Dec 16 '14 at 12:13
2

I have the same error at client side. Server is reachable and I can open the port via telnet. When I watched into it with Wireshark on client and server side I see the following:

  • TCP connection is established

    • SYN
    • SYN, ACK
    • ACK
  • Client sends: JRMI, Version 2, Stream Protocol

  • Server reply: JRMI, ProtocolAck - But this package never reached client side

In my case it it's the connection from MagicDraw client to license server. For other colleages at other locations it helps to use the proxy: http.proxyHost=xxxx -Dhttp.proxyPort=8080 and the client communicats via HTTP. So maybe this could help you to ommit this issue. https://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmi-arch6.html

I can not be specific as I don't have access to the source code of Magic Draw.

timguy
  • 2,063
  • 2
  • 21
  • 40
0

I get this error in the case, when a SSH-Client from outside the LAN, holding the SSH-Server, is trying to connect to the server and RMI is involved to let the client execute RMI-methods on the server. The reason is the unreachability (missing route) of the server. Seems that all the stated cases are related to that reason.