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!

java socket connection is resets after 1 hr of idle timeout

843790Mar 24 2007 — edited Mar 25 2007
My appln A needs to speak to app B using java sockets. server sockets are on App A and B tries to connect using client socket.

My appln is running on WAS 6.0

After every 1 hr of idle time,the sockets at app A are reset.
server socket is kept alive using setKeepAlive(true);
also SO_TIMEOUT is set to 0 for infinite timeout.

IOException is thrown as below

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:195)
at java.net.SocketInputStream.read(SocketInputStream.java:114)
at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java(Compiled Code))
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java(Compiled Code))
at java.io.InputStreamReader.read(InputStreamReader.java:208)
at java.io.BufferedReader.fill(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
at java.io.BufferedReader.readLine(BufferedReader.java(Compiled Code))
at com.ameriprise.max.app.trade.socket.MAXServerSocket.run(MAXServerSocket.java:252)
at java.lang.Thread.run(Thread.java:570)



There are firewalls between app A and app B but none of the firewalls are set for any timeouts.

When testing in our lower environments I noticied this message came out when client closed connection abruptly. But in testing environment the client(App B) is still has connections established with the server.

Also the keepalive timeout of both the servers is set to 2hrs

any guidance on above error is extremely helpful
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2007
Added on Mar 24 2007
1 comment
479 views