java.net.SocketException: Socket is closed

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 Oracle Community by Marcus Rangel, 1 year ago
via Oracle Community by 843790, 1 year ago
java.net.SocketException: Socket is closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.net.SocketInputStream.read(SocketInputStream.java:90)
at kiman.socktest.test(socktest:76)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 2 months ago
Once, 3 months ago
2129 times, 4 months ago
2 times, 7 months ago

Write tip

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