springGun
V2EX  ›  Java

tomcat"闪退"问题

  •  
  •   springGun · Feb 23, 2018 · 4286 views
    This topic created in 3007 days ago, the information mentioned may be changed or developed.
    之前我有发帖询问 tomcat "闪退"问题,这个一直没得到解决 .
    昨天又重新查询了下日志,发现 tomcat 手动 shutdown 后 ,日志提示有大量线程未关闭,那么这和 tomcat"闪退"有必然关系吗?
    "闪退"指的是 tomcat ,jvm,linux 无日志提示异常.
    19 replies    2018-02-24 14:06:38 +08:00
    fox0001
        1
    fox0001  
       Feb 23, 2018 via Android
    这个…根据你说的,没什么头绪,还是找 log 看看吧
    defunct9
        2
    defunct9  
       Feb 23, 2018
    开 ssh 我上去看看
    springGun
        3
    springGun  
    OP
       Feb 23, 2018
    @defunct9 公司内网服务
    ik
        4
    ik  
       Feb 23, 2018 via iPhone
    日志都不贴,怎么看
    rim99
        5
    rim99  
       Feb 24, 2018 via Android
    Mark 关注
    rim99
        6
    rim99  
       Feb 24, 2018 via Android
    我的 Springboot 服务有过 190 多个线程运行的情况。但是服务没有挂掉,只是接受请求很慢。20 分钟的样子。楼主这种情况没见过哇
    woscaizi
        7
    woscaizi  
       Feb 24, 2018 via iPhone
    和你的代码有关系,检查代码有没有子线程或者网络连接只有启动逻辑没有关闭逻辑。

    没有日志是不是因为日志等级高。检查 tomcat/logs/catlina.out 的内容。
    woscaizi
        8
    woscaizi  
       Feb 24, 2018 via iPhone
    @rim99 应该是 cpu 和内存占用高了,所以慢吧。htop 检查资源占用情况。
    jalja27
        9
    jalja27  
       Feb 24, 2018 via Android
    http://mp.weixin.qq.com/s/bWRW2CCHRFf7CXk7KVVrzw

    刚看到的,之前 V2EX 另一个帖子也有回复提到过这个
    shawshi
        10
    shawshi  
       Feb 24, 2018
    我以前遇到过,以及存在相应的问题
    1. jar 包冲突( logback 的日志)
    2. tomcat 启动 是否哪个任务占用过多资源过多,导致服务挂掉。
    3. 将日志级别调成 debug,分析日志慢慢找。
    pmispig
        11
    pmispig  
       Feb 24, 2018
    一般是 oom kill 了
    ntdll
        12
    ntdll  
       Feb 24, 2018
    检查一下,在退出之前是否 tomcat 占用了大量资源?如果是的话,可能是由于系统资源不足导致系统杀进程,所以 tomcat 没有任何提示。

    之前碰到过一个实习生写的,文件句柄只管开,没有关,然后跑着跑着,tomcat 就被系统杀掉了,也是没有任何提示。
    wangxiaolin
        13
    wangxiaolin  
       Feb 24, 2018
    jstack 一下
    springGun
        14
    springGun  
    OP
       Feb 24, 2018
    @ik

    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [ZkClient-EventThread-15-192.168.1.83:2181] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [localhost-startStop-1-SendThread(192.168.1.83:2181)] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [localhost-startStop-1-EventThread] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboSaveRegistryCache-thread-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboClientReconnectTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [New I/O client worker #1-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [dubbo-remoting-client-heartbeat-thread-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboResponseTimeoutScanTimer] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboClientReconnectTimer-thread-2] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [dubbo-remoting-client-heartbeat-thread-2] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
    springGun
        15
    springGun  
    OP
       Feb 24, 2018
    @ik

    SEVERE: The web application [/bjstqf_consoleweb] appears to have started a thread named [DubboSharedHandler-thread-1] but has failed to stop it. This is very likely to create a memory leak.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@53ebc3f4]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [org.apache.commons.lang.builder.HashCodeBuilder$1] (value [org.apache.commons.lang.builder.HashCodeBuilder$1@1b8df337]) and a value of type [java.util.HashSet] (value [[]]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [com.alibaba.dubbo.rpc.RpcContext$1] (value [com.alibaba.dubbo.rpc.RpcContext$1@4bdf1e2f]) and a value of type [com.alibaba.dubbo.rpc.RpcContext] (value [com.alibaba.dubbo.rpc.RpcContext@2536c693]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@2f26effb]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [org.apache.commons.lang.builder.HashCodeBuilder$1] (value [org.apache.commons.lang.builder.HashCodeBuilder$1@1b8df337]) and a value of type [java.util.HashSet] (value [[]]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [com.alibaba.dubbo.rpc.RpcContext$1] (value [com.alibaba.dubbo.rpc.RpcContext$1@4bdf1e2f]) and a value of type [com.alibaba.dubbo.rpc.RpcContext] (value [com.alibaba.dubbo.rpc.RpcContext@25555fec]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@80c921a]) 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
    springGun
        16
    springGun  
    OP
       Feb 24, 2018
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@49886b1f]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@1b30e5f0]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [org.apache.commons.lang.builder.HashCodeBuilder$1] (value [org.apache.commons.lang.builder.HashCodeBuilder$1@1b8df337]) and a value of type [java.util.HashSet] (value [[]]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2747fd82]) and a value of type [com.sutong.bjstqf.entity.LogInfo] (value [com.sutong.bjstqf.entity.LogInfo@675475f3]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [com.alibaba.dubbo.rpc.RpcContext$1] (value [com.alibaba.dubbo.rpc.RpcContext$1@4bdf1e2f]) and a value of type [com.alibaba.dubbo.rpc.RpcContext] (value [com.alibaba.dubbo.rpc.RpcContext@5a0bd984]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@3bc06419]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@3ff5974b]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [org.apache.commons.lang.builder.HashCodeBuilder$1] (value [org.apache.commons.lang.builder.HashCodeBuilder$1@1b8df337]) and a value of type [java.util.HashSet] (value [[]]) 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.
    Jan 02, 2018 9:22:56 AM org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
    SEVERE: The web application [/bjstqf_consoleweb] created a ThreadLocal with key of type [com.alibaba.dubbo.rpc.RpcContext$1] (value [com.alibaba.dubbo.rpc.RpcContext$1@4bdf1e2f]) and a value of type [com.alibaba.dubbo.rpc.RpcContext] (value [com.alibaba.dubbo.rpc.RpcContext@149fddbb]) 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.
    qqpkat2
        17
    qqpkat2  
       Feb 24, 2018
    这不是内存问题么。。。根源找不到还怎么分析判断
    rim99
        18
    rim99  
       Feb 24, 2018 via Android
    @woscaizi 谢谢回复。检查了,不是 CPU 内存。居然是磁盘满了。然后拉取 Git 仓卡住了。
    sutra
        19
    sutra  
       Feb 24, 2018
    dmesg 看看是不是有错误信息
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1263 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 17:43 · PVG 01:43 · LAX 10:43 · JFK 13:43
    ♥ Do have faith in what you're doing.