java - 如何通过catalina.out查找tomcat自动关机原因

标签 java spring-mvc tomcat tomcat7

最近tomcat出现几次就自动关机。但是通过catalina.out找不到原因

服务器:linux(1核cpu,1G内存)

Tomcat :7.0.65

tomcat server.xml 添加jvm设置: JAVA_OPTS="-server -Xms256m -Xmx512m -XX:PermSize=256M -XX:MaxPermSize=512m"

卡特琳娜.out

2016-05-17 00:31:55 -173311 [http-bio-8080-exec-5] DEBUG   - ==> Parameters: 3(String)
2016-05-17 00:31:55 -173313 [http-bio-8080-exec-5] DEBUG   - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@5503fcfc]
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
May 17, 2016 2:43:14 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
2016-05-17 02:43:14 -8036625 [localhost-startStop-2] INFO    - Closing WebApplicationContext for namespace 'springMvc-servlet': startup date [Tue May 17 00:29:22 CST 2016]; parent: Root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/legoms] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [/legoms] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [/legoms] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
2016-05-17 02:43:14 -8051975 [localhost-startStop-2] INFO    - Closing WebApplicationContext for namespace 'springMvc-servlet': startup date [Tue May 17 00:29:10 CST 2016]; parent: Root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
SEVERE: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak.
May 17, 2016 2:43:14 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [org.apache.shiro.util.ThreadContext.InheritableThreadLocalMap] (value [org.apache.shiro.util.ThreadContext$InheritableThreadLocalMap@6ae24d54]) and a value of type [java.util.HashMap] (value [{org.apache.shiro.util.ThreadContext_SECURITY_MANAGER_KEY=org.apache.shiro.web.mgt.DefaultWebSecurityManager@2f42fc9e, org.apache.shiro.util.ThreadContext_SUBJECT_KEY=org.apache.shiro.web.subject.support.WebDelegatingSubject@56d7014f}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
May 17, 2016 2:43:14 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]

最佳答案

您的 Tomcat 服务器可能关闭的原因是操作系统更新需要您的 JVM 启动(可能是内核更新)。我会首先查看以 yum 开头的操作系统日志或您的系统正在使用的任何包管理器,以查看是否有任何更新以及服务器停止时它在做什么。

这在我身上发生过很多次。

关于java - 如何通过catalina.out查找tomcat自动关机原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37281104/

相关文章:

java - 来自 Tomcat 的不完整 HTTP 响应

java - Flink 作业 : Getting InvalidClassException: com. fastxml.jackson.databind.ObjectMapper

java - Jenkins 的 Slack Slash 命令插件

java - Spring mvc - 无法打开 ServletContext 资源/WEB-INF/dispatcher-servlet.xml

java - 在 Weblogic 9.2 或 10.1 上部署 Jersey 1.3 Web 服务

Tomcat 8集群提高性能

java - 从 web.xml 文件(CDATA 项)中删除 "error"标记

java - 如何在 JavaFX 中将可见性绑定(bind)到 Controller

java单元测试本地范围的字符串

java - Bean创建错误