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();
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

mydeman

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值