`
xiao_yi
  • 浏览: 406152 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Connection reset by peer: socket write error

阅读更多

java.lang.RuntimeException: javax.xml.transform.TransformerException: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.ajaxanywhere.XMLHandler.sendDOMDocument(XMLHandler.java:123)
at org.ajaxanywhere.XMLHandler.sendZones(XMLHandler.java:93)
at org.ajaxanywhere.AAFilter.doFilter(AAFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.cmp.yiwu.util.NoCacheFilter.doFilter(NoCacheFilter.java:37)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:130)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:174)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:77)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.xml.transform.TransformerException: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:336)
at org.ajaxanywhere.XMLHandler.sendDOMDocument(XMLHandler.java:119)
... 27 more
Caused by: ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.xalan.serialize.SerializerToXML.flushWriter(SerializerToXML.java:1505)
at org.apache.xalan.serialize.SerializerToXML.endDocument(SerializerToXML.java:729)
at org.apache.xalan.transformer.TransformerIdentityImpl.endDocument(TransformerIdentityImpl.java:910)
at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:222)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:325)
... 28 more

原因:

一般是有些客户端已关闭,一些线程因为延迟等原因觉察不到此连接已结束,继续等到到出错

或是

客户端那里不停刷或一个访问/刷新没完成前再刷,要让这个无用的线程死掉

 
分享到:
评论

相关推荐

    java.net.SocketException Connection reset 解决方法

    * Connection reset by peer:Connection reset by peer 是一种特殊的 SocketException,它发生在客户端和服务器端之间的连接断开后,导致连接的一端继续发送数据,引发该异常。 实践经验 通过实践经验,我们可以...

    Modbus TCP客户端和服务器示例

    **Modbus TCP客户端和服务器示例** 在工业自动化和物联网(IoT)领域,Modbus是一种广泛使用的通信协议,它允许设备之间进行简单的数据交换。本文将深入探讨Modbus TCP,这是一种在网络环境中运行的Modbus变体,尤其...

    connection reset by peer问题总结及解决方案

    connection reset by peer问题总结及解决方案 1.服务器的并发连接数超过了其承载量,服务器会将其中一些连接关闭 如果知道实际连接服务器的并发客户端数并没有超过服务器的承载量,则有可能是中了病毒或者木马,引起...

    Socket长连接异常处理

    java.net.SocketException: Connection reset by peer: Socket write error 该异常可能发生在客户端和服务器端,原因是因为一端的 Socket 被关闭,而另一端继续发送数据。解决方法是确保在关闭连接前完成所有的数据...

    J2EE应用开发问题总结及最佳实践.pdf

    1. 使用 Oracle 数据库,大于 4k 的附件上传有问题,会报错 java.sql.SQLException: Connection reset by peer: socket write error。 解决办法是在插入 BLOB 字段值时,要先用 SELECT BLOBCOL FROM TABLENAME FOR ...

    javaerror处理资料

    java.net.SocketException: Connection reset by peer: Socket write error 此异常通常出现在客户端尝试向服务器写入数据时突然断开连接的情况。这种现象的原因可能是远程服务器突然关闭了连接,或者客户端发送的...

    DBCP连接池DBCP和C3P0配置

    根据提供的部分内容,“java.sql.SQLException: Already closed.”和“java.sql.SQLException: I/O exception: Connection reset by peer: socket write error”这类异常通常与数据库连接管理不当有关,如连接超时、...

    struts2+jsp实现文件上传的方法

    在文件上传或下载时,可能会遇到`SocketException: Connection reset by peer: socket write error`的异常。这个异常通常是由于网络中断或者客户端提前关闭连接引起的。在开发中,可以通过捕获异常并进行相应的处理...

    Java Socket常见异常处理

    4. **java.net.SocketException: (Connection reset 或 Connect reset by peer: Socket write error)** 这两种异常都表示连接已断开。可能的原因是一端关闭了Socket,而另一端仍在尝试读写。处理这类异常需要检测到...

    python中关于网络socket使用实例,供大家参考使用

    except ConnectionResetError: print('Connection reset by peer.') ``` 六、多线程或异步IO 在处理多个并发连接时,可以使用多线程或多进程,或者利用Python的asyncio库进行异步I/O。例如,使用asyncio创建一个...

Global site tag (gtag.js) - Google Analytics