java.net.SocketTimeoutException: timeout


Samebug tips

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.


7 months ago
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


7 months ago
Expert tip

Solutions on the web

Solution icon of github
timeout

Solution icon of github
via GitHub by npomfret
, 6 months ago
timeout

Solution icon of github
via GitHub by HanzhiDou
, 1 year ago
timeout

Solution icon of github
via GitHub by weverb2
, 8 months ago
timeout

Solution icon of github
via GitHub by jpechane
, 1 year ago
timeout

Solution icon of github
timeout

Solution icon of github
timeout

Solution icon of github
timeout

Solution icon of github
via GitHub by terry19850829
, 1 month ago
timeout

Solution icon of github
timeout

Stack trace

java.net.SocketTimeoutException: timeout
	at okio.Okio$3.newTimeoutException(Okio.java:212)[okio-1.8.0.jar:na]
	at okio.AsyncTimeout.exit(AsyncTimeout.java:288)[okio-1.8.0.jar:na]
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:242)[okio-1.8.0.jar:na]
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)[okio-1.8.0.jar:na]
	at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)[okio-1.8.0.jar:na]
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)[okio-1.8.0.jar:na]
	at okhttp3.internal.http.Http1xStream.readResponse(Http1xStream.java:184)[okhttp-3.3.1.jar:na]
	at okhttp3.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:125)[okhttp-3.3.1.jar:na]
	at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:775)[okhttp-3.3.1.jar:na]
	at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:86)[okhttp-3.3.1.jar:na]
	at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:760)[okhttp-3.3.1.jar:na]
	at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:613)[okhttp-3.3.1.jar:na]
	at okhttp3.RealCall.getResponse(RealCall.java:244)[okhttp-3.3.1.jar:na]
	at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)[okhttp-3.3.1.jar:na]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)[okhttp-3.3.1.jar:na]
	at okhttp3.RealCall.execute(RealCall.java:57)[okhttp-3.3.1.jar:na]
	at cn.wanghaomiao.seimi.http.okhttp.OkHttpDownloader.process(OkHttpDownloader.java:74)[classes/:na]
	at cn.wanghaomiao.seimi.core.SeimiProcessor.run(SeimiProcessor.java:106)[classes/:na]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_79]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_79]
	at java.lang.Thread.run(Thread.java:745)[na:1.7.0_79]
Caused by: java.net.SocketException: Socket closed
	at java.net.SocketInputStream.read(SocketInputStream.java:190)[na:1.7.0_79]
	at java.net.SocketInputStream.read(SocketInputStream.java:122)[na:1.7.0_79]
	at okio.Okio$2.read(Okio.java:140)[okio-1.8.0.jar:na]
	at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)[okio-1.8.0.jar:na]
	... 18 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

21 times, 1 month ago
2129 times, 3 months ago
2 times, 6 months ago
Once, 9 months ago
20 times, 2 days ago
465 more bugmates