GavinJ
V2EX  ›  Java

tomcat 无故挂掉?

  •  
  •   GavinJ · Aug 27, 2018 · 5163 views
    This topic created in 2993 days ago, the information mentioned may be changed or developed.

    不同的服务器,同样一套代码,同样的 tomcat 配置。A 服务器正常 B 服务器每隔 1 天左右自动挂掉; tomcat 内存设置的也足够大了。访问用户没有几个,新部署的服务器。

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc SEVERE: The web application [/hs-service] 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [FileWatchdog] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [Thread-2] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-2-1] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-1] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [threadDeathWatcher-4-1] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [pool-2-thread-1] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] 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.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [HouseKeeper] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-2] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [pool-2-thread-2] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-3] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [pool-2-thread-3] but has failed to stop it. This is very likely to create a memory leak.

    Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-4] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [pool-2-thread-4] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-5] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [pool-2-thread-5] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-6] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-7] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads SEVERE: The web application [/hs-service] appears to have started a thread named [nioEventLoopGroup-3-8] but has failed to stop it. This is very likely to create a memory leak. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1b51fdd1]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6b0e6e56]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@1dc8db89]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1b0902f8]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6b0e6e56]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@154d1579]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@9f6365c]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6b0e6e56]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@52b9a078]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@1f46615]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6b0e6e56]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@7cef4d8f]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@4493d098]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6b0e6e56]) and a value of type [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil.FactorySettings] (value [com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil$FactorySettings@5b360212]) 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. Aug 26, 2018 6:43:48 PM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks SEVERE: The web application [/hs-service] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6fde19ea]) and a value of type [io.netty.util.internal.InternalThreadLocalMap] (value [io.netty.util.internal.InternalThreadLocalMap@79d003af]) 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. Aug 26, 2018 6:43:48 PM org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["http-bio-8119"] Aug 26, 2018 6:43:48 PM org.apache.coyote.AbstractProtocol stop INFO: Stopping ProtocolHandler ["ajp-bio-8278"] Aug 26, 2018 6:43:48 PM org.apache.coyote.AbstractProtocol destroy INFO: Destroying ProtocolHandler ["http-bio-8119"] Aug 26, 2018 6:43:48 PM org.apache.coyote.AbstractProtocol destroy INFO: Destroying ProtocolHandler ["ajp-bio-8278"]

    22 replies  •  2018-08-28 14:51:01 +08:00
    qwx
    qwx
    Aug 27, 2018
    1
    你这已经是 tomcat 执行关闭时的日志了吧……
    nutting
    nutting
    Aug 27, 2018
    2
    啥服务器,独立的还是云,虚拟机什么的
    defunct9
    defunct9
    Aug 27, 2018❤️5
    3
    开 ssh,让我上去看看
    xiaoyukid
    xiaoyukid
    Aug 27, 2018
    4
    内存占用看看
    ytmsdy
    ytmsdy
    Aug 27, 2018
    5
    大概率是内存泄漏,导致内存爆掉。
    看看把 tomcat 的内存设置的大一点,挂掉的时间间隔是否会增加。
    如果增加了那就是内存泄漏的问题,
    logicr
    logicr
    Aug 27, 2018 via Android
    6
    日志不是一直在说你的内存不足么
    seaswalker
    seaswalker
    Aug 27, 2018 via iPhone
    7
    oom killer 杀掉了?
    KgM4gLtF0shViDH3
    KgM4gLtF0shViDH3
    Aug 27, 2018
    8
    @defunct9 每个这种问题下面都能看到你的这个回答,哈哈哈哈哈
    liwl
    liwl
    Aug 27, 2018
    9
    开 ssh,让我上去看看
    szq8014
    szq8014
    Aug 27, 2018
    10
    mark, 你这日志不全
    FrailLove
    FrailLove
    Aug 27, 2018
    11
    开 ssh,让我上去看看
    asd123456cxz
    asd123456cxz
    Aug 27, 2018
    12
    是代码漏洞导致有内存泄漏的风险吗?字面上看是这样
    woscaizi
    woscaizi
    Aug 27, 2018
    13
    感觉像是人工手动执行的 shutdown.sh
    1yndonn3u
    1yndonn3u
    Aug 27, 2018
    14
    @defunct9 233333
    idamien
    idamien
    Aug 27, 2018
    15
    这个应该是 tomcat 在部署 hs - service 时候有问题, 你可以重启,然后 tail - f 看看 catalina 的日志


    然后 top 看看内存还有 cpu 使用情况 swap 情况

    不行就接上 jmx 来看
    ixiaohei
    ixiaohei
    Aug 27, 2018
    16
    tomcat 8005 端口观点了么?
    ixiaohei
    ixiaohei
    Aug 27, 2018
    17
    关掉没有
    Charkey
    Charkey
    Aug 27, 2018
    18
    日志截取不全,看不到问题。
    defunct9
    defunct9
    Aug 27, 2018
    19
    哈哈,多了很多热心的群众,善莫大焉
    southsala
    southsala
    Aug 27, 2018
    20
    是你机器内存足够大吧,给 tomcat 多分配点啊 大哥
    wssy921
    wssy921
    Aug 28, 2018
    21
    开 ssh,让我上去看看
    GavinJ
    GavinJ
    OP
    Aug 28, 2018
    22
    @wssy921 皮
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1047 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 57ms · UTC 19:06 · PVG 03:06 · LAX 11:06 · JFK 14:06
    ♥ Do have faith in what you're doing.