ConnectException + EHOSTUNREACH with OkHttp

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


ConnectException + EHOSTUNREACH with OkHttp



When I try to make a server call using OkHttp from an Android tablet Galaxy Note 10 (OS 5.1.1) I receive the following exception :


Caused by: java.net.ConnectException: failed to connect to /192.168.0.143
(port 9090) after 30000ms: isConnected failed: EHOSTUNREACH (No route to
host)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at libcore.io.IoBridge.isConnected(IoBridge.java:238)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at libcore.io.IoBridge.connectErrno(IoBridge.java:171)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:122)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:456)
07-27 12:10:46.485 17491-18681/com.philips.iccaem.unsecured W/System.err: at java.net.Socket.connect(Socket.java:882)
07-27 12:10:46.490 17491-18681/com.philips.iccaem.unsecured W/System.err: at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.java:73)
07-27 12:10:46.490 17491-18681/com.philips.iccaem.unsecured W/System.err: at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:245)



I get this exception only on this particular device and not on other tablets. Additionally, I don't get this exception on another Galaxy Note 10 (with same OS version).
Why am I getting this exception only on one tablet?



P.S. : I am using Okhttp 3.11. This issue does not occur on OkHttp 3.3









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived