`

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里面的过滤器,该过滤器为

  <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>

分享到:
评论

相关推荐

    java.net.SocketException Connection reset 解决方法

    java.net.SocketException Connection reset 解决方法

    JAVA.NET.SOCKETEXCEPTION TOO MANY OPEN FILES解决方法

    JAVA.NET.SOCKETEXCEPTION TOO MANY OPEN FILES解决方法,三种方案,临时,永久,根治

    在Win7系统下抛出java.net.SocketException的解决办法

    java.net.SocketException: Unrecognized Windows Sockets error: 0: no Inet4Address associated with interface 本文提供了在Win7或Vista系统下解决这个异常信息的办法。

    java.net.SocketException: No route to host 异常原因

    NULL 博文链接:https://zhoudan241.iteye.com/blog/1432014

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

    最近纠结致死的一个java报错java.net.SocketException: Connection reset 终于得到解决

    http接口调用报错.rar

    接口调用报错:java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory

    System.SR.dll 无法显示错误信息

    System.Net.WebException: 无法显示错误消息,原因是无法找到包含此错误消息的可选资源程序集 ---&gt; System.Net.Sockets.SocketException: 无法显示错误消息,原因是无法找到包含此错误消息的可选资源程序集 ...

    Google I/O 2013推荐Android 网络通信框架Volley

    Google I/O 2013推荐Android 网络通信框架Volley 下载下来后然后编译为jar包,再在自己的工程里import进来。

    java网络编程示例

    import java.net.SocketException; public class UDPServer { public static void main(String[] args) { try { byte [] buffer = new byte[1024]; DatagramSocket socket = new DatagramSocket(4444); ...

    Hive2Hive-master.rar

    socket 文件同步

    fastdfs使用java

    FastDFS是一个开源的轻量级分布式文件系统,它对文件进行管理,功能包括:文件存储、文件同步、文件访问(文件上传、文件下载)等,解决了大容量存储和负载均衡的问题。特别适合以文件为载体的在线服务,如相册网站...

    ssh2必须的包(这是第二部分)

    注意:由于压缩包大于15M,所以分两部分上传,这是第一部分!下载SSH2-1后,再解压这两个文件后就可用了。

    类qq聊天工具

    34. import java.net.SocketException; 35. import java.net.UnknownHostException; 36. import java.util.Date; 37. import java.util.Scanner; 38. import java.util.Stack; 39. import java.util.prefs....

    Too many open files 解决方法

    转:java.net.SocketException: Too many open files解决方法最近随着网站访问量的提高把web服务器移到linux下了,在移服务器的第二天,tomcat频繁的报 java.net.SocketException: Too many open files错误,错误...

    C#阿里云发送SMTP邮件失败

    System.Net.Sockets.SocketException: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。 想到阿里云喜欢用安全组屏蔽端口,于是我就赶紧去配置了安全规则。进站出站都配置了,结果还是...

    Linux下打开的文件过多错误

    Linux下运行tomcat或者was出现java.net.SocketException: 打开的文件过多错误 tomcat报“too many open files”的错误,解决办法如下:

    ulimit设置句柄数

    放到服务器上运行一段时间抛出Toomanyopenfiles的...  异常信息简单的信息如下:  I/Oexception(java.net.SocketException)caughtwhenprocessingrequest:Toomanyopenfiles  大致了解下,是文件句柄数设置太低导致

    Windows6.1-KB2553549、KB2577795-x64.zip

    1.解决服务器报错:java.net.SocketException: No buffer space available (maximum connections reached?): JVM_Bind 2.解决Windows Server 2003/2008 R2系统BUG导致windows缓冲区已满(no buffer space),Windows...

    Ice-3.7.4.msi for windows版

    Caused by: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574) at ...

    aws-java-sns-mobile-push-sample:http 的 maven 项目

    有时会抛出 java.net.SocketException: Invalid argument) Java 行家 运行upload.rb 配置 将 aws 凭据设置为 AwsCredentials.properties 具有标记列和别名列的 csv 文件。 令牌列应命名为“device_token”或...

Global site tag (gtag.js) - Google Analytics