tomcat"闪退"问题

2018-02-23 21:12:30 +08:00
 springGun
之前我有发帖询问 tomcat "闪退"问题,这个一直没得到解决 .
昨天又重新查询了下日志,发现 tomcat 手动 shutdown 后 ,日志提示有大量线程未关闭,那么这和 tomcat"闪退"有必然关系吗?
"闪退"指的是 tomcat ,jvm,linux 无日志提示异常.
3591 次点击
所在节点    Java
19 条回复
fox0001
2018-02-23 21:57:03 +08:00
这个…根据你说的,没什么头绪,还是找 log 看看吧
defunct9
2018-02-23 22:27:47 +08:00
开 ssh 我上去看看
springGun
2018-02-23 22:41:10 +08:00
@defunct9 公司内网服务
ik
2018-02-23 22:59:19 +08:00
日志都不贴,怎么看
rim99
2018-02-24 00:31:15 +08:00
Mark 关注
rim99
2018-02-24 00:33:25 +08:00
我的 Springboot 服务有过 190 多个线程运行的情况。但是服务没有挂掉,只是接受请求很慢。20 分钟的样子。楼主这种情况没见过哇
woscaizi
2018-02-24 07:12:13 +08:00
和你的代码有关系,检查代码有没有子线程或者网络连接只有启动逻辑没有关闭逻辑。

没有日志是不是因为日志等级高。检查 tomcat/logs/catlina.out 的内容。
woscaizi
2018-02-24 07:13:34 +08:00
@rim99 应该是 cpu 和内存占用高了,所以慢吧。htop 检查资源占用情况。
jalja27
2018-02-24 08:19:51 +08:00
http://mp.weixin.qq.com/s/bWRW2CCHRFf7CXk7KVVrzw

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

之前碰到过一个实习生写的,文件句柄只管开,没有关,然后跑着跑着,tomcat 就被系统杀掉了,也是没有任何提示。
wangxiaolin
2018-02-24 11:16:09 +08:00
jstack 一下
springGun
2018-02-24 11:21:31 +08:00
@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
2018-02-24 11:22:46 +08:00
@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
2018-02-24 11:23:58 +08:00
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
2018-02-24 11:26:17 +08:00
这不是内存问题么。。。根源找不到还怎么分析判断
rim99
2018-02-24 12:29:34 +08:00
@woscaizi 谢谢回复。检查了,不是 CPU 内存。居然是磁盘满了。然后拉取 Git 仓卡住了。
sutra
2018-02-24 14:06:38 +08:00
dmesg 看看是不是有错误信息

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/432040

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX