File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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: 15951
    
  19

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.SocketException: Connection reset
 
Similar Threads
Web services in HTTPS. org.apache.axis2.AxisFault: Read timed out
java.net.SocketException on calling web service
asix2 client and windows based webservice interaction for unicode data
Embedded Tomcat 7 problem: concurrent requests lead to Fatal transport error
SocketException while uploading File of more than 2GB via Apache HttpClient Object in Websphere