How to solve SocketException: Failed host lookup: ‘www.xyz.com’ (OS Error: No address associated with hostname, errno = 7)

Adding internet permission is not only a solution. You also have to make sure that you are online whether it is mobile or emulator Make sure you are online whether it is mobile or emulator Make sure you have given internet permission in your app’s android/app/src/main/AndroidManifest.xml <uses-permission android:name=”android.permission.INTERNET”/>

JavaMail API to iMail — java.net.SocketException: Permission denied: connect

Add -Djava.net.preferIPv4Stack=true to the VM options. Another way to confirm if it is the same issue, in Netbeans, right click on the project > properties > Libraries and choose a JDK 6 Java Platform (install if you do not have it). Clean, build then try again. This will eliminate this issue as the problem Credit … Read more

What’s causing my java.net.SocketException: Connection reset? [duplicate]

This error happens on your side and NOT the other side. If the other side reset the connection, then the exception message should say: java.net.SocketException reset by peer The cause is the connection inside HttpClient is stale. Check stale connection for SSL does not fix this error. Solution: dump your client and recreate.