android调webservice出现 (Connection reset by peer)

sunnyinfo.myapplication D/IOException: +++++++++++++++++++++++java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at libcore.io.IoBridge.recvfrom(IoBridge.java:556) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okio.Okio$2.read(Okio.java:113) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:175) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:101) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:616) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at org.ksoap2.transport.ServiceConnectionSE.getResponseCode(ServiceConnectionSE.java:103) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:197) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:118) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at org.ksoap2.transport.HttpTransportSE.call(HttpTransportSE.java:113) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at com.sunnyinfo.myapplication.WebServiceUtils$2.run(WebServiceUtils.java:131) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 03-14 17:51:27.073 20045-20211/com.sunnyinfo.myapplication W/System.err: at java.lang.Thread.run(Thread.java:818)


1个回答

连接被服务器中断了,是不是你客户端发送的请求不符合格式。还有就是有没有防火墙拦截

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问