android - java.net.SocketTimeoutException: failed to connect -
hava working xmlparser
unfortunately error when i'm on mobile data.
problem doesn't occur on wi-fi , page available @ time.
do wrong?
i've permission internet.
stack trace:
05-14 21:26:35.628: w/system.err(17691): java.net.sockettimeoutexception: failed connect buie.vlsolutions.nl/185.10.98.4 (port 80) after 15000ms 05-14 21:26:35.633: w/system.err(17691): @ libcore.io.iobridge.connecterrno(iobridge.java:159) 05-14 21:26:35.633: w/system.err(17691): @ libcore.io.iobridge.connect(iobridge.java:112) 05-14 21:26:35.633: w/system.err(17691): @ java.net.plainsocketimpl.connect(plainsocketimpl.java:192) 05-14 21:26:35.633: w/system.err(17691): @ java.net.plainsocketimpl.connect(plainsocketimpl.java:459) 05-14 21:26:35.633: w/system.err(17691): @ java.net.socket.connect(socket.java:842) 05-14 21:26:35.633: w/system.err(17691): @ libcore.net.http.httpconnection.<init>(httpconnection.java:76) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpconnection.<init>(httpconnection.java:50) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpconnection$address.connect(httpconnection.java:340) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpconnectionpool.get(httpconnectionpool.java:87) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpconnection.connect(httpconnection.java:128) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpengine.opensocketconnection(httpengine.java:315) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpengine.connect(httpengine.java:310) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpengine.sendsocketrequest(httpengine.java:289) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpengine.sendrequest(httpengine.java:239) 05-14 21:26:35.638: w/system.err(17691): @ libcore.net.http.httpurlconnectionimpl.connect(httpurlconnectionimpl.java:80) 05-14 21:26:35.638: w/system.err(17691): @ nl.vlsolutions.buienl.mainactivity.downloadurl(mainactivity.java:475) 05-14 21:26:35.638: w/system.err(17691): @ nl.vlsolutions.buienl.mainactivity.loadxmlfromnetwork(mainactivity.java:342) 05-14 21:26:35.638: w/system.err(17691): @ nl.vlsolutions.buienl.mainactivity.access$2(mainactivity.java:334) 05-14 21:26:35.643: w/system.err(17691): @ nl.vlsolutions.buienl.mainactivity$downloadxmltask.doinbackground(mainactivity.java:307) 05-14 21:26:35.643: w/system.err(17691): @ nl.vlsolutions.buienl.mainactivity$downloadxmltask.doinbackground(mainactivity.java:1) 05-14 21:26:35.643: w/system.err(17691): @ android.os.asynctask$2.call(asynctask.java:287) 05-14 21:26:35.643: w/system.err(17691): @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:305) 05-14 21:26:35.643: w/system.err(17691): @ java.util.concurrent.futuretask.run(futuretask.java:137) 05-14 21:26:35.643: w/system.err(17691): @ android.os.asynctask$serialexecutor$1.run(asynctask.java:230) 05-14 21:26:35.643: w/system.err(17691): @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1076) 05-14 21:26:35.643: w/system.err(17691): @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:569) 05-14 21:26:35.648: w/system.err(17691): @ java.lang.thread.run(thread.java:856)
function downloadurl:
private inputstream downloadurl(string urlstring) throws ioexception { url url = new url(urlstring); httpurlconnection conn = (httpurlconnection) url.openconnection(); conn.setreadtimeout(10000 /* milliseconds */); conn.setconnecttimeout(15000 /* milliseconds */); conn.setrequestmethod("get"); conn.setdoinput(true); // starts query conn.connect(); // line 475 return conn.getinputstream(); }
it turns out there problem dns server data provider. because server changed ip-addresses , dns server not yet updated.
Comments
Post a Comment