java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)

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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by weidongjian
, 1 year ago
sendto failed: ENETUNREACH (Network is unreachable)
via GitHub by zdby
, 10 months ago
sendto failed: ENETUNREACH (Network is unreachable)
via GitHub by YaleZheng
, 1 year ago
sendto failed: ENETUNREACH (Network is unreachable)
via shoutcast.com by Unknown author, 2 years ago
via GitHub by door43app
, 1 month ago
sendto failed: ENETUNREACH (Network is unreachable)
java.net.SocketException: sendto failed: ENETUNREACH (Network is unreachable)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:206)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:278)
at libcore.io.IoBridge.sendto(IoBridge.java:513)
at java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:184)
at java.net.DatagramSocket.send(DatagramSocket.java:305)
at com.qiniu.android.dns.local.Resolver.udpCommunicate(Resolver.java:49)
at com.qiniu.android.dns.local.Resolver.resolve(Resolver.java:34)
at com.qiniu.android.dns.DnsManager.queryInternal(DnsManager.java:168)
at com.qiniu.android.dns.DnsManager.query(DnsManager.java:116)
at com.qiniu.android.dns.DnsManager.queryInetAdress(DnsManager.java:213)
at com.qiniu.android.http.Client$1.lookup(Client.java:64)
at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:172)
at okhttp3.internal.connection.RouteSelector.nextProxy(RouteSelector.java:138)
at okhttp3.internal.connection.RouteSelector.next(RouteSelector.java:80)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:178)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:129)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:98)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:109)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:124)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:170)
at okhttp3.RealCall.access$100(RealCall.java:33)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:120)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

2 times, 9 months ago
2 times, 1 year ago
6743 times, 1 year ago
9 times, 1 year ago
2 times, 1 year ago

Write tip

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