java.net.SocketException, underlying cause: Software caused connection abort: re

web程序发布在tomat6下,程序使用spring3+hebernate3+struts2,数据库mysql5


连续刷新页面导致

java.sql.SQLException
MESSAGE: Communication link failure: java.net.SocketException, underlying cause: Software caused connection abort: recv failed


Following scenario fully reproduces the problem with clear Sockets:
1) Client -> Server: client sends request chunk#1
2) Server -> Client: server reads chunk#1, processes, writes response
3) Server closes connection
4) Client -> Server: client sends request chunk#2
5) Client tries to read server response: "java.net.SocketException: Software caused connection abort: recv failed"

As the result client will not be able to read any byte from server's response!
What is interesting on step (4) we don't see any exception, but this step (sending data over connection, which is closed by peer) is the reason of the exception we're getting on (5). Removing step (4) from our scenario, or putting it before step (3) - makes everything work.


对于webApp程序来说 这样错误并不严重

有一种解决方法,不彻底,就是删除tomcat下web.xml里面的过滤器,该过滤器为

扫描二维码关注公众号,回复: 817052 查看本文章

  <filter>

    <filter-name>HTTPMonitorFilter</filter-name>

    <filter-class>org.netbeans.modules.web.monitor.server.MonitorFilter</filter-class>

    <init-param>

      <param-name>netbeans.monitor.ide</param-name>

      <param-value>127.0.0.1:8082</param-value>

    </init-param>

  </filter>

  <filter-mapping>

    <filter-name>HTTPMonitorFilter</filter-name>

    <url-pattern>/*</url-pattern>

    <dispatcher>REQUEST</dispatcher>

    <dispatcher>FORWARD</dispatcher>

    <dispatcher>INCLUDE</dispatcher>

    <dispatcher>ERROR</dispatcher>

  </filter-mapping>

猜你喜欢

转载自csumissu.iteye.com/blog/1089916
今日推荐