java.net.SocketException: Connection reset

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

It's possible you're trying to write to a connection that's already closed. Another cause for this is that you closed the socket with unread data in the socket receive buffer.

,
Expert tip

This might be caused by unmatching versions of SSL. Java starts normally with SSLv2 and your server might not be able to negotiate. You have to force Java to use SSLv3. See this comment: https://goo.gl/hx0YB3

Solutions on the web

via Stack Overflow by Anwarul
, 1 year ago
via Stack Overflow by user1914367
, 2 years ago
via Coderanch by Charles Sexton, 1 year ago
Connection reset
via Oracle Community by David Knierim, 1 year ago
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.(Unknown Source)
at Try3.ServerX.main(ServerX.java:15)

Users with the same issue

Once, 1 week ago
Once, 1 week ago
9 times, 1 week ago
Once, 3 weeks ago
373 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.