JDK-6430061 : Sun's HTTP handler retrying requests
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 5.0u6
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-05-24
  • Updated: 2010-04-02
  • Resolved: 2006-08-15
Related Reports
Duplicate :  
Description
During a stress test intermittently Sun's handler is retrying a request in response to the following exception.

    [java] java.net.SocketException: Software caused connection abort: recv
failed
     [java] 	at java.net.SocketInputStream.socketRead0(Native Method)
     [java] 	at java.net.SocketInputStream.read(SocketInputStream.java:129)
     [java] 	at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
     [java] 	at
java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
     [java] 	at
java.io.BufferedInputStream.read(BufferedInputStream.java:313)
     [java] 	at
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:608)
     [java] 	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
     [java] 	at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:942)
     [java] 	at
weblogic.wsee.connection.transport.TransportUtil.getInputStream(TransportUtil.java:91)
     [java] 	at
weblogic.wsee.connection.transport.http.HTTPClientTransport.receive(HTTPClientTransport.java:184)
     [java] 	at
weblogic.wsee.connection.soap.SoapConnection.receive(SoapConnection.java:80)
     [java] 	at
weblogic.wsee.ws.dispatch.client.ConnectionHandler.handleResponse(ConnectionHandler.java:161)
     [java] 	at
weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:242)
     [java] 	at
weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:226)
     [java] 	at
weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:161)
     [java] 	at
weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:116)
     [java] 	at weblogic.wsee.ws.WsStub.invoke(WsStub.java:89)
     [java] 	at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:335)
     [java] 	at
dev2dev.security_roles.web.client.SecureEchoPort_Stub.echo(SecureEchoPort_Stub.java:32)
     [java] 	at
dev2dev.security_roles.web.client.SecureEchoClient.main(SecureEchoClient.java:39)


This exception is happening because the server is sending a TCP RST to the client. From analyzing the TCP sniffer logs here is what we found.

1. client opens connection by sending SYN
2. server acknowleges and sends SYN
3. client writes the http request
4. server acknowleges the data
5. WLS processes the http request and writes a 401 response
6. WLS closes the socket and sends FIN
7. Server side tcp kernel issues a RST on the connection
8. Client attempts to read the data and gets a socket close error.

Comments
EVALUATION has been identified as a duplicate of 6382788
15-08-2006

WORK AROUND Use WebLogic HTTP handler. This problem only occurs with Sun's HTTP handler.
24-05-2006