Tomcat的SEVERE: Remote Host / SocketException: Connection reset原因分析及解决办法

昨天在测试帮助文件时发现一直打不开,好像是一直再刷新,于是就到服务器上查看Tomcat的日志,就发现了下面的信息:
Apr 21, 2008 9:27:34 AM org.apache.tomcat.util.net.TcpWorkerThread runIt
SEVERE: Remote Host /172.16.128.248 SocketException: Connection reset
并且这两条信息几乎是每个1-2秒就出现一次,很是频繁。于是就搜索了一下,就找到了下面的内容:
The usual cause is that the browser's stopped a HTTP request part-way through,
generally because the user's navigated to another page before the first page has
completely downloaded. The browser closes the connection, with the result that
Tomcat gets an exception when it next tries to write data to the socket.
Arguably it shouldn't be logged as a SEVERE error on production systems, but
getting that log message during development and stress testing can be very
handy! 于是就查看它引用的JavaScript文件,发现好多不存在。终于明白,是因为有些变量不存在,导致了这里的反复重载。重新加入这些JavaScript文件后,问题解决。

Fix it by any of the following (in increasing order of difficulty):

1) Ignore it (and change any log-reading scripts that look for SEVERE errors to
ignore this one);

2) Grab the source for 5.0.28, find the line where this is logged and change the
logging level in the case of a connection reset error, then recompile Tomcat;

3) Educate your users that they are supposed to sit on their hands until the
page has completely loaded (by far the hardest ;-) ).

后面还有别人的补充:
If it happens that often and you don't have a high traffic site, it might be a monitor script, that does only check if it can do a TCP connect and drop the connection before a full HTTP request-response cycle has finished.

不过我的情况和上面所说的都不符合,于是就查看了源文件,发现了如下代码:

if (!window.gbWhVer||!window.gbWhUtil||!window.gbWhMsg)
    document.location.reload();

时间: 2024-11-05 16:25:54

Tomcat的SEVERE: Remote Host / SocketException: Connection reset原因分析及解决办法的相关文章

t sl-QtSsl 出现the remote host closed connection 问题

问题描述 QtSsl 出现the remote host closed connection 问题 刚开始学QtSsl 一直找不到什么例子 好不容易看到个 问题是 运行的时候 Client出现了the remote host closed connection的问题 代码如下:ClientExample::ClientExample(QObject *parent): QObject(parent){ } void ClientExample::run(){ QString hostName =

服务器-java.net.SocketException: Connection reset时出时不出

问题描述 java.net.SocketException: Connection reset时出时不出 最近写一个很简单的TCP通信的程序,问题的详细情况是这样的:服务器端在电脑上,客户端在android手机上,android手机连上学校里的无线可以正常连接.现在我用运行着服务器端的电脑上的360免费wifi开无线,android手机连上电脑开的这个无线再进行连接的时候就会抛出java.net.SocketException: Connection reset的错误!为什么呢?难道是TCP通信

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

自从SEOTcs系统11月份24日更新了一下SEO得分算法以来,一直困扰我的一个问题出现了,java的数据job任务,在执行过程中会经常报以下的错误: "2011-12-03 18:00:32 DefaultHttpClient [INFO] I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error2011-12-03

腾讯云ubuntu服务器tomcat访问慢的原因分析及解决方法_Linux

在腾讯云上配了个一元的学生云,开始一切正常,直到配置tomcat开始出现各种莫名其妙的问题.最莫名其妙的是tomcat启动了,端口也 正常监听,安全组也放行端口了,然后问题来了. 用浏览器访问tomcat主页,会发现超级慢,浏览器一直在等待服务器的响应,从这里可以看出能够接入8080端口,但是服务器没有返回数据.(这个问题折腾几天) 后来在网上找了无数资料,终于发现了原因.tomcat8.0在腾讯云ubuntu14.04上有bug. 问题原因: 随机数引起线程阻塞. tomcat不断启动,关闭,

java.net.SocketException: Connection reset

问题描述 java.net.SocketException:Connectionresetatjava.net.SocketInputStream.read(SocketInputStream.java:168)atsun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)atsun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)atsun.nio.cs.StreamDecode

Caused by: java.net.SocketException: Connection reset能有什么原因?

问题描述 前台java调后台C++时报错,请各位帮忙看看.能有什么原因. 解决方案 解决方案二:该回复于2009-08-28 13:35:41被版主删除

tomcat在opensuse下开机自启失败的原因分析及解决方法_unix linux

环境•opensuse 10.2•tomcat 5.5 设置信息在/etc/init.d/boot.local中添加如下命令:/opt/tomcat/bin/startup.sh 错误描述opensuse启动完毕后,tomcat一直没启动. 分析1. 系统启动完毕后,手动启动tomcat可以成功,说明不是权限的问题.2. 查找系统日志(/var/log/boot.msg),找到了如下信息: Neither the JAVA_HOME nor the JRE_HOME environment va

新浪api-调用OAuth4Code 出现weibo4j.model.WeiboException: Connection reset错误

问题描述 调用OAuth4Code 出现weibo4j.model.WeiboException: Connection reset错误 执行OAuth4Code 跳转到配置文件中定义的redirect_URI , 从浏览器中拷贝code在控制台中黏贴,回车,代码继续执行到 oauth.getAccessTokenByCode(code); 报下列异常 Hit enter when it's done.[Enter]:633579c984915e30f8127d9b833b4b56 1 INFO

Connection reset by peer: socket write error

问题描述 Connection reset by peer: socket write error Caused by: org.springframework.dao.DataAccessResourceFailureException: Error querying database. Cause: java.sql.SQLException: Io 异常: Connection reset by peer: socket write error The error may exist in