HTTP based bug tracking and defect tracking
Aug 21, 2004 | Home > Bugzero > FAQs > Errors

HTTP connection reset by peer

Problem

java.net.SocketException: Connection reset by peer: socket write error
        at java.net.SocketOutputStream.socketWrite(Native Method)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:83)
        at org.apache.tomcat.service.http.HttpResponseAdapter.doWrite(HttpResponseAdapter>
        at org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOutp>
        at org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutput>
        at org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutput>
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
        at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(A>
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)

Causes and solutions

This exception occurs when a client made a request, and before receiving the full response, either of the following happened:

  1. client's browser has been closed.
  2. client's connection has been disconnected.
  3. client presses the stop button.
This exception is normally harmless. It does not seem possible to trap this exception with J2SE.

 
* Reference brought to you by Bugzero, it's more than just bug tracking software!