问题描述
服务器版本:SunOSHZ-MMSA-SP25.9Generic_117171-07sun4usparcSUNW,Sun-Fire-V440tomcat版本:apache-tomcat-7.0.55jdk版本:javaversion"1.6.0_85"Java(TM)SERuntimeEnvironment(build1.6.0_85-b13)JavaHotSpot(TM)ServerVM(build20.85-b01,mixedmode)我在网上看了下,别人的tomcat自动停止后,大多会在bin下生成如hs_err_pid3956.log的日志文件,我这个没有日志信息:Jan12,201510:48:31AMorg.apache.coyote.AbstractProtocolpauseINFO:PausingProtocolHandler["http-bio-8080"]Jan12,201510:48:32AMorg.apache.coyote.AbstractProtocolpauseINFO:PausingProtocolHandler["ajp-bio-8009"]Jan12,201510:48:32AMorg.apache.catalina.core.StandardServicestopInternalINFO:StoppingserviceCatalinaJan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesJdbcSEVERE:Thewebapplication[/syslog-forward]registeredtheJDBCdriver[oracle.jdbc.OracleDriver]butfailedtounregisteritwhenthewebapplicationwasstopped.Topreventamemoryleak,theJDBCDriverhasbeenforciblyunregistered.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Thread-2]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Thread-3]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Timer-0]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Thread-DataReceive-main]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Timer-1]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Timer-2]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[Timer-3]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.catalina.loader.WebappClassLoaderclearReferencesThreadsSEVERE:Thewebapplication[/syslog-forward]appearstohavestartedathreadnamed[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2]buthasfailedtostopit.Thisisverylikelytocreateamemoryleak.Jan12,201510:48:32AMorg.apache.coyote.AbstractProtocolstopINFO:StoppingProtocolHandler["http-bio-8080"]Jan12,201510:48:32AMorg.apache.coyote.AbstractProtocolstopINFO:StoppingProtocolHandler["ajp-bio-8009"]Jan12,201510:48:32AMorg.apache.coyote.AbstractProtocoldestroyINFO:DestroyingProtocolHandler["http-bio-8080"]Jan12,201510:48:32AMorg.apache.coyote.AbstractProtocoldestroyINFO:DestroyingProtocolHandler["ajp-bio-8009"]
解决方案
解决方案二:
你是不是没用nohup启动啊,如果用sh启动,当前用户退出就自动关闭了
解决方案三:
从日志来看,这个tomcat属于正常关闭。hs_err_pid3956.log这种文件只有JVM出现Error的时候才会生成(最常见的是OutOfMemoryError)。检查一下是不是什么任务计划,或者什么脚本正常关闭的tomcat