Tomcat 在没有任何日志或任何堆栈的情况下停止

Tomcat stopped without any log or any stack(Tomcat 在没有任何日志或任何堆栈的情况下停止)
本文介绍了Tomcat 在没有任何日志或任何堆栈的情况下停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

Tomcat 5.5 有问题,它在我们的生产服务器(Linux CentOS 4.8)上晚上停止,我们不知道它为什么停止......catalina.out 或任何应用程序的日志中都没有 Tomcat 的日志.

We have trouble with Tomcat 5.5 which stops at night on our production servers (Linux CentOS 4.8) and we have no idea why it stops... There is no Tomcat's log in catalina.out or any application's log.

我们尝试了不同的方法来找出服务器停止的原因:

We tried different things to find why the server stops:

  • 配置 Tomcat 以生成核心转储
  • 使用 javassist 检测 System.exit() 方法以查找该方法是否被调用
  • 向 JVM 添加关闭挂钩(使用 Runtime.getRuntime().addShutdownHook())
  • configure Tomcat to be able to generate a core dump
  • instrument System.exit() method with javassist to find if the method was called
  • add a shutdown hook to the JVM (with Runtime.getRuntime().addShutdownHook())

它们都不起作用,我们没有核心转储,没有调用 Exit 方法和关闭挂钩.我的结论是:

None of them worked, we have no core dump, the Exit method and the shutdown hook are not called. My conclusions are:

  • VM 未正确终止,但没有任何日志而崩溃.

有什么想法或日志可以阅读以找出 Tomcat 停止的原因吗?

Any idea or log to read to find why Tomcat stops?

推荐答案

1) 确保你知道 stderr 被重定向到哪里,并检查那里是否打印了任何内容.

1) Make sure you know where stderr is redirected and check if anything got printed there.

2) 检查 Tomcat 的内存限制以及系统有多少可用内存.查看/var/log 下的 Linux 系统日志,看看在此期间是否发生了任何可疑的事情.例如,如果系统内存不足,内核可以(几乎)不留痕迹地随机杀死一个进程.

2) Check the memory limits on Tomcat and how much free memory does the system have. Review the Linux system logs under /var/log to see if anything suspicious happened during the time. For example, kernel can randomly kill a process (almost) without a trace if the system is running low on memory.

FWIW,我们多年来一直在生产 5.5,从未发生过任何无法解释的停机.

We've ran 5.5 in production for years and never had any unexplained shutdowns, FWIW.

这篇关于Tomcat 在没有任何日志或任何堆栈的情况下停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Show padding zeros using DecimalFormat(使用 DecimalFormat 显示填充零)
Java decimal formatting using String.format?(使用 String.format 的 Java 十进制格式?)
Sprintf equivalent in Java(Java 中的 Sprintf 等价物)
StAX XML formatting in Java(Java 中的 StAX XML 格式)
Java - format double value as dollar amount(Java - 将双值格式化为美元金额)
Java printf using variable field size?(Java printf使用可变字段大小?)