最近,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"
catalina.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"]
答案 0 :(得分:0)
Tomcat服务器可能关闭的原因是操作系统更新需要JVM启动(可能是内核更新)。我首先查看以yum开头的操作系统日志或系统正在使用的任何软件包管理器,以查看是否有任何更新以及服务器停止时它正在执行的操作。
这已经发生在我身上很多次了。