This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Tomcat and the fly likes java.net.SocketException: Connection reset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "java.net.SocketException: Connection reset" Watch "java.net.SocketException: Connection reset" New topic
Author

java.net.SocketException: Connection reset

Divya Comv
Greenhorn

Joined: Sep 18, 2013
Posts: 1
Hi Folks,

We are getting below random error while sending request from one web application to another.

It is messing up the live application only for some of the requests.


java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413)
at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)
at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at com.btsl.flares.apps.mmoney.communicator.HTTPCommunicator.sendHTTPMessage(HTTPCommunicator.java:240)
at com.btsl.flares.apps.mmoney.acceptor.handler.OneShotRequestHandler.processResponse(OneShotRequestHandler.java:81)
at com.btsl.flares.apps.mmoney.utils.MessageProcessor.run(MessageProcessor.java:96)


Please suggest what could be possible reason and fixes for the above issue.


Regards,
Divya
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16158
    
  21

Welcome to the JavaRanch, Divya!

Socket exceptions usually mean that something broke the link between client and server. This can happen if there is a problem with the network, such as unreliable equipment or bad configuration (the MTU settings are often involved).

The other possibility for a connection reset is when it takes too long for a server to fulfil a client request. In that case, the client may timeout while waiting for the server. This can be managed by proper web application design.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
 
subject: java.net.SocketException: Connection reset