0
最近,tomcat在自動關機時出現了好幾次。但不catalina.out的如何通過catalina.out找到tomcat的自動關機原因
找到原因服務器:採用Linux(1個核CPU,1G內存)
的Tomcat:7.0.65
tomcat的server.xml中添加JVM設置: JAVA_OPTS =「 - 服務器-Xms256m -Xmx512m -XX:PermSize = 256M -XX:MaxPermSize參數=512米」
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 [[email protected]]
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 [[email protected]e24d54]) and a value of type [java.util.HashMap] (value [{org.apache.shiro.util.ThreadContext_SECURITY[email protected]2f42fc9e, org.apache.shiro.util.ThreadContext_SUBJEC[email protected]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"]
謝謝。但如何找出哪些系統日誌文件?使用'ls -l/var/log /',不喜歡最新的更新日誌文件 –
不應該有很多日誌需要排序,因爲很多系統文件都是滾動的,所以在這個例子中我不認爲搜索是必要的。尋找一個特定的日期/時間。例如,在一個centos系統上,你可能有一個消息,yum.log和安全文件。 –