GavinJ
V2EX  ›  Java

tomcat 无故挂掉?

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


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

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