DBMNG数据库管理与应用

书籍是全世界的营养品。生活里没有书籍,就好像没有阳光;智慧里没有书籍,就好像鸟儿没有翅膀。
当前位置:首页 > 经验分享 > Java开发

java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)异常原因

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、下载大文件时,频繁请求服务器,请求的端口一直被占用
本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号