when I try to get the input stream from an URL, I get the following Error:
W/System.err: java.io.FileNotFoundException: https://...
W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:250)
W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java)
W/System.err: at com.andrei.mobilissimoro.MainActivity$FeedTask.doInBackground(MainActivity.java:406)
W/System.err: at com.andrei.mobilissimoro.MainActivity$FeedTask.doInBackground(MainActivity.java:371)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:305)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
W/System.err: at java.lang.Thread.run(Thread.java:761)
And the response code is 500.
Here is the code:
HttpURLConnection httpURLConnection;
try {
httpURLConnection = (HttpURLConnection)new URL(feed).openConnection();
httpURLConnection.setRequestMethod("GET");
Integer status = httpURLConnection.getResponseCode();
System.out.println(status.toString());
InputStream inputStream = httpURLConnection.getInputStream();
feedModelList = parseFeed(inputStream);
}
catch (Exception e){
e.printStackTrace();
}
Server will send 500 code, when there is some exception while executing code on server while responding to your API call.
Related
I have simple "gadget" based on Arduino. It is connected to the wlan of my house and sending web requests to it turns on/off a red LED indicating that I'm busy/free in my room. This works fine when called from a browser or from my small winforms application. It is called synchronous, it is just enough, no need for async calls.
But, I tried to create a android app that sends the same requests, no success. I have read many topics, tried different ways etc. The app has this row in manifest file:
android:networkSecurityConfig="#xml/network_security_config"
Maybe something is still missing. This might be very very basic, but I haven't been able to get it working. Code:
public void onViewCreated(#NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
binding.buttonFirst.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View view) {
OkHttpClient client = new OkHttpClient();
String url = "http://192.168.100.12/LED=ON";
Request req = new Request.Builder()
.url(url)
.build();
try {
client.newCall(req).execute();
} catch (IOException | RuntimeException e) {
e.printStackTrace();
}
NavHostFragment.findNavController(FirstFragment.this)
.navigate(R.id.action_FirstFragment_to_SecondFragment);
}
});
}
It fails on execute call. The app enters the catch section, but there's no understandable description in e. And of course, my mobile phone is connected to the same wlan.
Stack trace:
I/System.out: port:80
W/System.err: android.os.NetworkOnMainThreadException
W/System.err: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1513)
W/System.err: at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:389)
W/System.err: at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
W/System.err: at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
W/System.err: at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
W/System.err: at java.net.Socket.connect(Socket.java:631)
W/System.err: at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.kt:63)
W/System.err: at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:295)
W/System.err: at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:207)
W/System.err: at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226)
W/System.err: at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106)
W/System.err: at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.kt:74)
W/System.err: at okhttp3.internal.connection.RealCall.initExchange$okhttp(RealCall.kt:255)
W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:32)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
W/System.err: at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
W/System.err: at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
W/System.err: at com.example.donotdisturb.FirstFragment$1.onClick(FirstFragment.java:52)
W/System.err: at android.view.View.performClick(View.java:6603)
W/System.err: at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:1119)
W/System.err: at android.view.View.performClickInternal(View.java:6576)
W/System.err: at android.view.View.access$3100(View.java:780)
W/System.err: at android.view.View$PerformClick.run(View.java:26088)
W/System.err: at android.os.Handler.handleCallback(Handler.java:873)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err: at android.os.Looper.loop(Looper.java:193)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6705)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
I am getting the following error :
java.net.ConnectException: failed to connect to /139.59.67.108 (port 21): connect failed: ECONNREFUSED (Connection refused)
Caused by: android.system.ErrnoException: connect failed: ECONNREFUSED (Connection refused)
at libcore.io.Posix.connect(Native Method)
Here is my code
try
{
FTPClient con = null;
con = new FTPClient();
con.connect("139.59.67.108");
Log.v("checkLogin", "succeeded");
if (con.login("xxxx", "xxxx"))
{
con.enterLocalPassiveMode(); // important!
con.setFileType(FTP.BINARY_FILE_TYPE);
///data/data/com.prd.inspirationslate/databases
String data = "/data/data/com.prd.inspirationslate/databases"; //path on device
FileInputStream in = new FileInputStream(new File(data));
Log.v("upload result check", "succeeded");
boolean result = con.storeFile("/vivekm4a.m4a", in);
in.close();
if (result) Log.v("upload result", "succeeded");
con.logout();
con.disconnect();
}
}
catch (Exception e)
{
e.printStackTrace();
}
trying to upload file via ftp on server . On filezilla I can easily connect
Log trace
java.net.ConnectException: failed to connect to /139.59.67.108 (port 21): connect failed: ECONNREFUSED (Connection refused)
W/System.err: at libcore.io.IoBridge.connect(IoBridge.java:124)
W/System.err: at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
W/System.err: at
java.net.PlainSocketImpl.connect(PlainSocketImpl.java:163)
W/System.err: at java.net.Socket.startupSocket(Socket.java:592)
W/System.err: at java.net.Socket.tryAllAddresses(Socket.java:128)
W/System.err: at java.net.Socket.(Socket.java:178)
W/System.err: at java.net.Socket.(Socket.java:150)
W/System.err: at
org.apache.commons.net.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
W/System.err: at
org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
W/System.err: at
org.apache.commons.net.SocketClient.connect(SocketClient.java:250)
W/System.err: at
com.prd.inspirationslate.LoginActivity$2$1.run(LoginActivity.java:120)
W/System.err: at java.lang.Thread.run(Thread.java:818)
W/System.err: Caused by: android.system.ErrnoException: connect
failed: ECONNREFUSED (Connection refused) W/System.err: at
libcore.io.Posix.connect(Native Method) W/System.err: at
libcore.io.BlockGuardOs.connect(BlockGuardOs.java:111) W/System.err:
at libcore.io.IoBridge.connectErrno(IoBridge.java:137) W/System.err:
at libcore.io.IoBridge.connect(IoBridge.java:122) W/System.err: ...
11 more
I'm having issues with the https connection to a server with a self signed certificate on devices < api 19. I followed this guide published by android for trusting self-signed certifcates Android SSL and it seems to work fine with all the api>19 devices i tested. How ever i keep getting the "Trust anchor for certification path not found" error on pre 19.
I've created the keystore using keytool and doesn't seem to be the problem because is working on some devices.
This is my code:
URL url_uri = new URL(url);
AssetManager am = context.getAssets();
InputStream caInput = am.open("certs/myCert.bks");
KeyStore keyStore;
try {
keyStore = KeyStore.getInstance("BKS");
char[] pass = "MyPassword".toCharArray();
keyStore.load(caInput, pass);
} finally {
caInput.close();
}
// Create a TrustManager that trusts the CAs in our KeyStore
String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
tmf.init(keyStore);
// Create an SSLContext that uses our TrustManager
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, tmf.getTrustManagers(), null);
HttpsURLConnection urlConnection =
(HttpsURLConnection)url_uri.openConnection();
urlConnection.setSSLSocketFactory(context.getSocketFactory());
InputStream in = urlConnection.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuffer sb = new StringBuffer("");
String line = "";
String NL = System.getProperty("line.separator");
while ((line = reader.readLine()) != null){
sb.append(line + NL);
}
in.close();
JSON = sb.toString();
And here is the logcat error:
W/System.err: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
W/System.err: at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)
W/System.err: at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:209)
W/System.err: at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478)
W/System.err: at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
W/System.err: at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
W/System.err: at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
W/System.err: at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
W/System.err: at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
W/System.err: at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
W/System.err: at com.splunk.mint.network.http.MonitorableHttpsURLConnection.getInputStream(MonitorableHttpsURLConnection.java:73)
W/System.err: at com.w3is2.webservice.JsonConnect.connectSSL(JsonConnect.java:161)
W/System.err: at com.w3is2.webservice.JsonConnect.getFamilias(JsonConnect.java:482)
W/System.err: at com.w3is2.dat.biologia.ListaFamilias$DataLoader.doInBackground(ListaFamilias.java:137)
W/System.err: at com.w3is2.dat.biologia.ListaFamilias$DataLoader.doInBackground(ListaFamilias.java:124)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:287)
W/System.err: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err: at java.lang.Thread.run(Thread.java:856)W/System.err: Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
W/System.err: at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:192)
W/System.err: at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:163)
W/System.err: at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:573)
W/System.err: at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
W/System.err: at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
W/System.err: ... 20 more
W/System.err: Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
W/System.err: ... 25 more
W/System.err: org.json.JSONException: End of input at character 0 of
W/System.err: at org.json.JSONTokener.syntaxError(JSONTokener.java:450)
W/System.err: at org.json.JSONTokener.nextValue(JSONTokener.java:97)
W/System.err: at org.json.JSONObject.<init>(JSONObject.java:154)
W/System.err: at org.json.JSONObject.<init>(JSONObject.java:171)
W/System.err: at com.w3is2.webservice.JsonConnect.getFamilias(JsonConnect.java:488)
W/System.err: at com.w3is2.dat.biologia.ListaFamilias$DataLoader.doInBackground(ListaFamilias.java:137)
W/System.err: at com.w3is2.dat.biologia.ListaFamilias$DataLoader.doInBackground(ListaFamilias.java:124)
W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:287)
W/System.err: at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:137)
W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
W/System.err: at java.lang.Thread.run(Thread.java:856)
I got SSLException while uploading video to the server via okhttp3.
final OkHttpClient clientOk = new OkHttpClient();
MultipartBody requestBody = new MultipartBody.Builder()
.addFormDataPart("file1", "file",
RequestBody.create(MediaType.parse("video/mp4"), sourceFile))
.addFormDataPart("id", id)
.build();
Request request = new Request.Builder()
.header("x_token", token)
.url(configuration.getApiBaseURLString() + "/path")
.post(requestBody)
.build();
clientOk.newCall(request).enqueue(new Callback() {
#Override
public void onFailure(Call call, IOException e) {
Log.d(TAG, "onFailure " + e.getMessage());
}
#Override
public void onResponse(Call call, Response response) throws IOException {
Log.d(TAG, "onResponse " + response.toString());
}
});
and error is
W/System.err: javax.net.ssl.SSLException: Write error: ssl=0x98e37a40: I/O error during system call, Broken pipe
W/System.err: at com.android.org.conscrypt.NativeCrypto.SSL_write(Native Method)
W/System.err: at com.android.org.conscrypt.OpenSSLSocketImpl$SSLOutputStream.write(OpenSSLSocketImpl.java:771)
W/System.err: at okio.Okio$1.write(Okio.java:80)
W/System.err: at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
W/System.err: at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
W/System.err: at okio.RealBufferedSink.write(RealBufferedSink.java:46)
W/System.err: at okhttp3.internal.http.Http1xStream$FixedLengthSink.write(Http1xStream.java:286)
W/System.err: at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
W/System.err: at okio.RealBufferedSink.writeAll(RealBufferedSink.java:104)
W/System.err: at okhttp3.RequestBody$3.writeTo(RequestBody.java:118)
W/System.err: at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:171)
W/System.err: at okhttp3.MultipartBody.writeTo(MultipartBody.java:113)
W/System.err: at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:704)
W/System.err: at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:563)
W/System.err: at okhttp3.RealCall.getResponse(RealCall.java:241)
W/System.err: at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:198)
W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:160)
W/System.err: at okhttp3.RealCall.access$100(RealCall.java:30)
W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:127)
W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
W/System.err: at java.lang.Thread.run(Thread.java:818)
Video size is 15.5 MB. Any thought what I'm doing wrong ?
Thank you in advance!
I am able to send sizes below 5MB. And on the backend I was told that set limit 'client_max_body_size' == 60MB
I increased the timeout of okhttp client to 5 minutes:
OkHttpClient client = new OkHttpClient();
client.setConnectTimeout(5, TimeUnit.MINUTES);
client.setReadTimeout(5, TimeUnit.MINUTES);
client.setWriteTimeout(5, TimeUnit.MINUTES);
client.interceptors().add(new Interceptor() {
#Override
public Response intercept(Chain chain) throws IOException {
Request original = chain.request();
// Customize the request
Request request = original.newBuilder()
//.header("Accept", "application/json")
.header("Authorization", Constants.SERVICE_AUTH_KEY)
.method(original.method(), original.body())
.build();
// Customize or return the response
return chain.proceed(request);
}
});
Retrofit retrofit = new Retrofit.Builder()
.baseUrl(Constants.SERVICE_URL)
.client(client)
.addCallAdapterFactory(RxJavaCallAdapterFactory.create())
.addConverterFactory(GsonConverterFactory.create())
.build();
I use WCF Webservice, i also increased the timeout time to same thing.
Everything works perfectly fine, but uploading file or image to the server.
Even after increasing timeout on both Android and WCF, I still get the error on android:
java.net.SocketException: sendto failed: ETIMEDOUT (Connection timed
out)
This is the full log
W/System.err: java.net.SocketException: sendto failed: ETIMEDOUT (Connection timed out)
W/System.err: at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:550)
W/System.err: at libcore.io.IoBridge.sendto(IoBridge.java:519)
W/System.err: at java.net.PlainSocketImpl.write(PlainSocketImpl.java:511)
W/System.err: at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
W/System.err: at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
W/System.err: at okio.Okio$1.write(Okio.java:80)
W/System.err: at okio.AsyncTimeout$1.write(AsyncTimeout.java:155)
W/System.err: at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
W/System.err: at okio.RealBufferedSink.write(RealBufferedSink.java:46)
W/System.err: at com.squareup.okhttp.internal.http.HttpConnection$FixedLengthSink.write(HttpConnection.java:302)
W/System.err: at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
W/System.err: at okio.RealBufferedSink.writeAll(RealBufferedSink.java:104)
W/System.err: at com.squareup.okhttp.RequestBody$3.writeTo(RequestBody.java:118)
W/System.err: at com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeOrCountBytes(MultipartBuilder.java:277)
W/System.err: at com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeTo(MultipartBuilder.java:297)
W/System.err: at com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:887)
W/System.err: at com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:749)
W/System.err: at com.squareup.okhttp.Call.getResponse(Call.java:268)
W/System.err: at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:224)
W/System.err: at com.mbh.mbhportal.network.NewPortalService$1.intercept(NewPortalService.java:59)
W/System.err: at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:221)
W/System.err: at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:195)
W/System.err: at com.squareup.okhttp.Call.execute(Call.java:79)
W/System.err: at retrofit.OkHttpCall.execute(OkHttpCall.java:116)
W/System.err: at retrofit.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:111)
W/System.err: at retrofit.RxJavaCallAdapterFactory$CallOnSubscribe.call(RxJavaCallAdapterFactory.java:88)
W/System.err: at rx.Observable$2.call(Observable.java:162)
W/System.err: at rx.Observable$2.call(Observable.java:154)
W/System.err: at rx.Observable$2.call(Observable.java:162)
W/System.err: at rx.Observable$2.call(Observable.java:154)
W/System.err: at rx.Observable$2.call(Observable.java:162)
W/System.err: at rx.Observable$2.call(Observable.java:154)
W/System.err: at rx.Observable.unsafeSubscribe(Observable.java:8098)
W/System.err: at rx.internal.operators.OperatorSubscribeOn$1$1.call(OperatorSubscribeOn.java:62)
W/System.err: at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:153)
W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
W/System.err: at java.lang.Thread.run(Thread.java:838)
W/System.err: Caused by: libcore.io.ErrnoException: sendto failed: ETIMEDOUT (Connection timed out)
W/System.err: at libcore.io.Posix.sendtoBytes(Native Method)
W/System.err: at libcore.io.Posix.sendto(Posix.java:151)
W/System.err: at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
W/System.err: at libcore.io.IoBridge.sendto(IoBridge.java:517)
W/System.err: ... 40 more
What timeout is this ETIMEDOUT !?