Dear Tomcat community, I am trying to resolve the problem where some client code in Java frequently gets the following error in the logs:
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.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632) at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000) ... The client code performs a simple HTTP POST request to a Tomcat server (FreeBSD 9.0-STABLE, Java 1.6.0_03, Tomcat 6.0.26). Below is the HTTP connector from server.xml: <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="10000" enableLookups="false" compression="on" maxThreads="256" bufferSize="9000" /> Tracing the servlet in Tomcat shows that the servlet's doPost() method returns normally and does not show any exceptions (I catch and log Throwable and nothing related is logged). Tracing on an application level shows the posted data to be in the database, as would be for a normal POST. The data is correct. Of note is that the response time of the post is the same as for a successful post. Under normal circumstances Tomcat processes a post in about 25ms, measured in the client. When I get this exception, the response time is also about that time. I think therefore that I am not timing out anywhere (or the response time would be a lot longer). First question: It says "Connection reset" and not "Connection reset by peer". What is the difference between the two? I am told that one means a local reset and the other means a remote reset. Where can I find more about this difference? Second question: how do I analyze such resets? How do I find out who reset the connection and why? How can I replay this in such a way that I can see that? -- Kees Jan http://java-monitor.com/ kjkos...@kjkoster.org +31651838192 Change is good. Granted, it is good in retrospect, but change is good. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org