Recommended solutions based on your search
There is a known issue between TestNG 6.4 and IDEA, the next EAP will fix this but in the meantime, use the previous version.
Solutions on the web
java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.DataOutputStream.writeByte(Unknown Source)