Given this stack trace snippet
Caused by: java.net.SocketException: Software caused connection abort: socket write error
&nbs
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?
I was facing the same issue.
Commonly This kind of error occurs due to client has closed its connection and server still trying to write on that client.
So make sure that your client has its connection open until server done with its outputstream.
And one more thing, Don`t forgot to close input and output stream.
Hope this helps.
And if still facing issue than brief your problem here in details.
This error happened to me while testing my soap service with SoapUI client, basically I was trying to get a very big message (>500kb) and SoapUI closed the connection by timeout.
On SoapUI go to:
File-->Preferences--Socket Timeout(ms)
...and put a large value, such as 180000 (3 minutes), this won't be the perfect fix for your issue because the file is in fact to large, but at least you will have a response.
To prove which component fails I would monitor the TCP/IP communication using wireshark and look who is actaully closing the port, also timeouts could be relevant.
In the situation explained below, client side will throw such an exception:
The server is asked to authenticate client certificate, but the client provides a certificate which Extended Key Usage doesn't support client auth, so the server doesn't accept the client's certificate, and then it closes the connection.
In my case, I developped the client and the server side, and I have the exception :
Cause : error marshalling arguments; nested exception is: java.net.SocketException: Software caused connection abort: socket write error
when classes in client and server are different. I don't download server's classes (Interfaces) on the client, I juste add same files in the project. But the path must be exactly the same. For example, on the server project I have java\rmi\services packages with some serviceInterface and implementations, I have to create the same package on the client project. If I change it by java/rmi/server/services for example, I get the above exception. Same exception if the interface version is different between client and server (even with an empty row added inadvertently ... I think rmi makes a sort of hash of classes to check version ... I don't know... If it could help ...