当前位置: 代码迷 >> Java Web开发 >> java.net.SocketException: Connection reset解决办法
  详细解决方案

java.net.SocketException: Connection reset解决办法

热度:602   发布时间:2016-04-17 13:06:43.0
java.net.SocketException: Connection reset
程序运行了两天就出现了这个错误:是什么原因?该怎么解决?
java.net.SocketException:   Connection   reset
at   java.net.SocketInputStream.read(SocketInputStream.java:168)
at   java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at   java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at   org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:156)
at   java.io.FilterInputStream.read(FilterInputStream.java:111)
at   org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:110)
at   java.io.FilterInputStream.read(FilterInputStream.java:90)
at   org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:129)
at   org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:702)

------解决方案--------------------
理论上来说是网络的问题。
------解决方案--------------------
也可能读取了过长的数据,可能服务器此时已经调用了socket.close()
  相关解决方案