Official reasons for “Software caused connection abort: socket write error”

后端 未结 14 1987
别跟我提以往
别跟我提以往 2020-11-21 07:21

Given this stack trace snippet

Caused by: java.net.SocketException: Software caused connection abort: socket write error
&nbs

14条回答
  •  粉色の甜心
    2020-11-21 07:59

    The java.net.SocketException is thrown when there is an error creating or accessing a socket (such as TCP). This usually can be caused when the server has terminated the connection (without properly closing it), so before getting the full response. In most cases this can be caused either by the timeout issue (e.g. the response takes too much time or server is overloaded with the requests), or the client sent the SYN, but it didn't receive ACK (acknowledgment of the connection termination). For timeout issues, you can consider increasing the timeout value.

    The Socket Exception usually comes with the specified detail message about the issue.

    Example of detailed messages:

    • Software caused connection abort: recv failed.

      The error indicates an attempt to send the message and the connection has been aborted by your server. If this happened while connecting to the database, this can be related to using not compatible Connector/J JDBC driver.

      Possible solution: Make sure you've proper libraries/drivers in your CLASSPATH.

    • Software caused connection abort: connect.

      This can happen when there is a problem to connect to the remote. For example due to virus-checker rejecting the remote mail requests.

      Possible solution: Check Virus scan service whether it's blocking the port for the outgoing requests for connections.

    • Software caused connection abort: socket write error.

      Possible solution: Make sure you're writing the correct length of bytes to the stream. So double check what you're sending. See this thread.

    • Connection reset by peer: socket write error / Connection aborted by peer: socket write error

      The application did not check whether keep-alive connection had been timed out on the server side.

      Possible solution: Ensure that the HttpClient is non-null before reading from the connection.E13222_01

    • Connection reset by peer.

      The connection has been terminated by the peer (server).

    • Connection reset.

      The connection has been either terminated by the client or closed by the server end of the connection due to request with the request.

      See: What's causing my java.net.SocketException: Connection reset?

提交回复
热议问题