码迷,mamicode.com
首页 > 编程语言 > 详细

java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

时间:2014-09-19 10:04:35      阅读:1984      评论:0      收藏:0      [点我收藏+]

标签:android   style   http   color   io   os   java   ar   for   

java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
11-22 14:49:16.870: WARN/System.err(3581):     at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:542)
11-22 14:49:16.870: WARN/System.err(3581):     at libcore.io.IoBridge.recvfrom(IoBridge.java:506)
11-22 14:49:16.870: WARN/System.err(3581):     at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
11-22 14:49:16.870: WARN/System.err(3581):     at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
11-22 14:49:16.870: WARN/System.err(3581):     at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:82)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:180)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:235)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:259)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:279)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:428)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
11-22 14:49:16.870: WARN/System.err(3581):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
11-22 14:49:16.870: WARN/System.err(3581):     at com.cplatform.android.cmsurfclient.download.provider.AndroidHttpClient.execute(AndroidHttpClient.java:172)
11-22 14:49:16.870: WARN/System.err(3581):     at com.cplatform.android.cmsurfclient.download.provider.DownloadThread.run(DownloadThread.java:205)
11-22 14:49:16.900: WARN/System.err(3581): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
11-22 14:49:16.900: WARN/System.err(3581):     at libcore.io.Posix.recvfromBytes(Native Method)
11-22 14:49:16.900: WARN/System.err(3581):     at libcore.io.Posix.recvfrom(Posix.java:131)
11-22 14:49:16.900: WARN/System.err(3581):     at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)
11-22 14:49:16.900: WARN/System.err(3581):     at libcore.io.IoBridge.recvfrom(IoBridge.java:503)
11-22 14:49:16.900: WARN/System.err(3581):     ... 18 more

 

 

原因:1、服务器中断

   2、网络连接非常慢的时候

    3、下载大文件时,频繁请求服务器,请求的端口一直被占用

java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

标签:android   style   http   color   io   os   java   ar   for   

原文地址:http://www.cnblogs.com/butterfly-clover/p/3980718.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!