Recommended solutions based on your search
You are probably trying to write to a connection when the other end (the remote end of the connection) has already closed it.
Solutions on the web
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)