java.net.SocketTimeoutException: Read timed out
843793Oct 18 2004 — edited Nov 15 2004We have an RMI application running through a apache commons Daemon service. The server daemon is running on redhat linux and the JDK we are using is 1.4.2_05.
The application runs for some time (1 hour to 12 hours successfully) and then we start getting java.net.SocketTimeoutException: Read timed out errors from the client side. Here is a stack 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(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
In the standard out log for the daemon server, we can see a hotspot error:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4CF019
Function=fgets_unlocked+0x29
Library=/lib/tls/libc.so.6
Current Java thread:
at java.net.Inet4AddressImpl.getHostByAddr(Native Method)
at java.net.InetAddress$1.getHostByAddr(InetAddress.java:774)
at java.net.InetAddress.getHostFromNameService(InetAddress.java:464)
at java.net.InetAddress.getHostName(InetAddress.java:407)
at java.net.SocketPermission.getCanonName(SocketPermission.java:567)
at java.net.SocketPermission.impliesIgnoreMask(SocketPermission.java:770)
at java.net.SocketPermissionCollection.implies(SocketPermission.java:1129)
at java.security.Permissions.implies(Permissions.java:157)
at sun.security.provider.PolicyFile.implies(PolicyFile.java:1096)
I have read through old posts and have tried the suggestions. We have the latest library files (JNI) on the linux box. If it happened all the time, then we could try to figure out what the problem is, but if it runs for sometime and cause the error intermittently, that becomes a problem.
Has anyone seen this problem on redhat and with the latest JDK and library files?
Any suggestions would be really appreciated.
thanks,
Sharath