socket-timeout-exception

Unable connect to a HTTP URL in Android 10

谁说胖子不能爱 提交于 2021-02-05 06:57:05
问题 I am using a http://something API for the login process. But could't get a hit on API in Android 10. For rest of the version, the API is working fine. First of all, I was getting SocketTimeoutException . Then I tried following solutions. 1) Added below attribute to <application> in Manifest. android:usesCleartextTraffic="true" Result: Still getting SocketTimeoutException . 2) Then I added networkSecurityConfig : <network-security-config> <domain-config cleartextTrafficPermitted="true">

Java http request GET causes timeout exception while it works fine in the browser

耗尽温柔 提交于 2020-08-09 09:22:11
问题 I have been playing with Http in Java and I faced a strange problem. Below is a piece code which executes GET method: OkHttpClient client = new OkHttpClient(); client.setConnectTimeout(100, TimeUnit.SECONDS); client.setReadTimeout(100, TimeUnit.SECONDS); Response response = null; Request request = new Request.Builder() .url("https://www.celebritycruises.com/") .get() .build(); try { response = client.newCall(request).execute(); System.out.println(response.code()); } catch (IOException e) { e

SocketTimeoutException: Read time out

放肆的年华 提交于 2020-01-11 05:40:12
问题 It's a simple client/server based ping/pong program. Unfortunately, IT doesn't work and displays this error message: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.net.SocketInputStream.read(Unknown Source) at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) at sun.nio.cs.StreamDecoder.implRead(Unknown Source) at sun.nio.cs.StreamDecoder.read(Unknown Source) at java.io

socket read timed out - should I go for 0 (inifite)

徘徊边缘 提交于 2020-01-06 19:38:32
问题 I'm downloading a big file (say around 100mb) and I'm receiving SocketException: Read timed out every now and then. I'm thinking of raising the socket timeout. Actually, I'm thinking of setting the socket timeout to 0 (infinite) as eventually the sizes that the files that my app will be downloading may even go greater than 300mb, or even greater than 300mb. Is this a good practice? Regarding socket timeout, when does the timeout countdown actually starts? I mean, when a socket timeout occurs,

Android - setSoTimeout not working

前提是你 提交于 2019-12-30 14:08:27
问题 So I'm running into a not working socket timeout. I followed all instructions given by existing posts, but its still not working (I never get a socket timeout exception). Here is my code: AsyncTask<String, Void, String> task = new AsyncTask<String, Void, String>() { @Override protected String doInBackground(String... params) { String location = params[0]; try { HttpGet httpGet = new HttpGet(location); HttpParams httpParameters = new BasicHttpParams(); // Set the timeout in milliseconds until

SocketTimeoutException when ConnectTimeout and ReadTimeout is infinite? [duplicate]

蓝咒 提交于 2019-12-25 08:25:04
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Receiving request timeout even though connect timeout and read timeout is set to default (infinite)? I tried to connect to a web service and received a SocketTimeoutException after approximately 20 seconds. The Tomcat server hosting the web service is down so the Exception is expected. However, I did not set the value of my ConnectTimeout and ReadTimeout. According to the documentation, the default values of

AWS SWF Decider 'java.net.SocketTimeoutException: Read timed out' when polling

微笑、不失礼 提交于 2019-12-25 04:12:16
问题 I'm encountering this error whenever my SWF Worker application polls. If there's an entry in the SWF queue, it gets processed properly. But if it's empty, this timeout exception is returned. com.amazonaws.http.AmazonHttpClient : Unable to execute HTTP request: Read timed out java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.8.0_31] at java.net.SocketInputStream.read(SocketInputStream.java:150) ~[na:1.8.0_31] at java.net

How to debug SocketTimeoutException?

ぐ巨炮叔叔 提交于 2019-12-24 02:33:38
问题 We are getting a java.net.SocketTimeoutException on server B when client A connects to server B. No idea why. The client is sending data to the server and the server then throws this exception. How would one troubleshoot this issue? Note currently this has happened only once. Not sure if this is reproduceable. Attempting to setup the test again.. 回答1: No data arrived at the receiver within the timeout period. That's all it means. Debugging it means finding out why the data you think was sent

Upload of Sonar report fails due to SocketTimeoutException

ⅰ亾dé卋堺 提交于 2019-12-23 04:54:28
问题 We have a problem similar to those already discussed in Sonar analysis fails with SocketTimeoutException and Read timed out on SonarQube analysis but it happens to us in version 5.6.2. We have a large number of sonar analyses as a series of nightly builds starting at midnight and ending in the early morning. Only the first analysis (sometimes the first couple of analyses) are affected by a SocketTimeoutException during the upload of the report: [exec] 00:15:33.724 DEBUG: Upload report [exec]

SocketTimeoutException after converting from http to https in android app

血红的双手。 提交于 2019-12-23 02:54:21
问题 I am getting some problems after trying to convert my android app to use SSL to transport information between my android app and web server. (SocketTimeOutException) I have bought a Positive SSL certificate from a Certificate Authority (CA) and configured my server to work with it correctly. I have tested it in my web browser and its working correctly. Now I am trying to modify my android app to use https instead of http but as this is the first time I have used https myself, I am a little