The web application [/jenkins] appears to have started a thread named [Executor

fxhchl 2012-10-18 11:20:33
linux系统下,tomcat6 jenkins重新构建项目tomcat就终止,日志输出抛异常,如下

严重: The web application [] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the J
DBC Driver has been forcibly unregistered.
2012-10-18 10:36:54 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["http-bio-8180"]
2012-10-18 10:36:54 org.apache.coyote.AbstractProtocol stop
信息: Stopping ProtocolHandler ["ajp-bio-8019"]
2012-10-18 10:36:54 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-bio-8888"]
2012-10-18 10:36:54 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-bio-8029"]
2012-10-18 10:36:54 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina1
2012-10-18 10:36:54 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextDestroyed()
2012-10-18 10:36:54 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextDestroyed()
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping ldap
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping external-monitor-job
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping pam-auth
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping ant
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping javadoc
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping cvs
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping translation
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping subversion
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping ssh-slaves
2012-10-18 10:36:54 hudson.PluginWrapper stop
信息: Stopping maven-plugin
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/jenkins] appears to have started a thread named [Executor #0 for master : executing dbboss #12] but has failed to stop it. This is very likely to create
a memory leak.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/jenkins] appears to have started a thread named [pool-59-thread-1] but has failed to stop it. This is very likely to create a memory leak.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [net.sf.json.AbstractJSON$1] (value [net.sf.json.AbstractJSON$1@628b4163]) and a value of type [java.uti
l.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.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2471fd20]) and a value of type [org.acegisecurity.
context.SecurityContextImpl] (value [org.acegisecurity.context.SecurityContextImpl@ffffffff: Null authentication]) but failed to remove it when the web application was stopped. Thr
eads are going to be renewed over time to try and avoid a probable memory leak.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [org.kohsuke.stapler.Stapler$1] (value [org.kohsuke.stapler.Stapler$1@4033ca1f]) and a value of type [ja
va.text.SimpleDateFormat] (value [java.text.SimpleDateFormat@c4dc9900]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to t
ry and avoid a probable memory leak.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [com.google.inject.internal.InjectorImpl$1] (value [com.google.inject.internal.InjectorImpl$1@81ada27])
and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@1ae83a99]) but failed to remove it when the web application was stopped. Threads are going to be renewed over t
ime to try and avoid a probable memory leak.
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2471fd20]) and a value of type [hudson.security.No
tSerilizableSecurityContext] (value [hudson.security.NotSerilizableSecurityContext@1f: Authentication: org.acegisecurity.providers.UsernamePasswordAuthenticationToken@1f: Username:
SYSTEM; Password: [PROTECTED]; Authenticated: false; Details: null; Not granted any authorities]) but failed to remove it when the web application was stopped. Threads are going t
o be renewed over time to try and avoid a probable memory leak.
2012-10-18 10:36:54 hudson.model.Run execute
信息: dbboss #12 aborted
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at java.lang.UNIXProcess.waitFor(UNIXProcess.java:165)
at hudson.Proc$LocalProc.join(Proc.java:319)
at hudson.Launcher$ProcStarter.join(Launcher.java:352)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:82)
at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:807)
at hudson.model.Build$BuildExecution.build(Build.java:199)
at hudson.model.Build$BuildExecution.doRun(Build.java:160)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:589)
at hudson.model.Run.execute(Run.java:1516)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:236)
2012-10-18 10:36:54 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [/jenkins] created a ThreadLocal with key of type [hudson.model.Run$1] (value [hudson.model.Run$1@155e402]) and a value of type [java.text.SimpleDateForma
t] (value [java.text.SimpleDateFormat@b61f11ff]) 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.
请问一下怎么回事
...全文
45483 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
Ganx 2014-11-19
  • 打赏
  • 举报
回复
引用 4 楼 staticabc 的回复:
我也遇到了类似的问题,用的是tomcat6.0.37,具体问题是:在conf下的server.xml里配置上下文根的时候如果这样写path="/a"就能正常启动,这样写path="/"就启动报错,错误和楼主类似,找了好久没找到解决方法,网上有人说是tomcat重启时之前的资源还没释放,包括jdbc,threadlocal等资源,要自己实现一个ServletContextListenser在tomcat停止之前去关闭/释放资源;还有解释是tomcat6.0.25之后的版本引入了内存泄露检测,ssh框架存在这个bug(主要是hibernate的问题),把oracle驱动包放到tomcat/lib下,让tomcat管理jdbc连接的话就不会出现The web application [] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped.这个问题了,我试了一下,这是可以的,但下面的无法关闭线程引起的内存泄露并不能解决,后来又各种百度,都没解决,今天早晨又看了一下,这次把正常启动和非正常启动输出到eclipse控制台上的日志都copy下来并进行了对比,发现日志的前部分都是一致的,没问题,在后来“信息: Deploying web application directory ROOT”之后,使用path="/"这种设置的,就会报错,后来把webapps下的目录全删了(重点是删除ROOT目录),再重启就没问题。 总结:问题原因未找到,推测是启动ROOT报错(我ROOT目录是空目录),为什么会报错,不知道,谁知道@我。 问题解决方法:删除webapps下无关的目录,删除conf/Catalina/localhost/下无关文件。
谢谢,反应我的问题解决了!
jsp_style 2014-10-16
  • 打赏
  • 举报
回复
引用 7 楼 zxdfc 的回复:
求解,我也遇到了
怎么解决的啊?我也遇到了
在风雨中奔跑 2014-10-14
  • 打赏
  • 举报
回复
求解,我也遇到了
manbanpaic 2014-09-12
  • 打赏
  • 举报
回复
楼主如何解决的
l631068264 2014-08-11
  • 打赏
  • 举报
回复
严重: The web application [/SSH2] 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. 2014-8-11 15:00:38 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads 严重: The web application [/SSH2] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. 怎么解决
staticabc 2014-06-25
  • 打赏
  • 举报
回复
我也遇到了类似的问题,用的是tomcat6.0.37,具体问题是:在conf下的server.xml里配置上下文根的时候如果这样写path="/a"就能正常启动,这样写path="/"就启动报错,错误和楼主类似,找了好久没找到解决方法,网上有人说是tomcat重启时之前的资源还没释放,包括jdbc,threadlocal等资源,要自己实现一个ServletContextListenser在tomcat停止之前去关闭/释放资源;还有解释是tomcat6.0.25之后的版本引入了内存泄露检测,ssh框架存在这个bug(主要是hibernate的问题),把oracle驱动包放到tomcat/lib下,让tomcat管理jdbc连接的话就不会出现The web application [] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped.这个问题了,我试了一下,这是可以的,但下面的无法关闭线程引起的内存泄露并不能解决,后来又各种百度,都没解决,今天早晨又看了一下,这次把正常启动和非正常启动输出到eclipse控制台上的日志都copy下来并进行了对比,发现日志的前部分都是一致的,没问题,在后来“信息: Deploying web application directory ROOT”之后,使用path="/"这种设置的,就会报错,后来把webapps下的目录全删了(重点是删除ROOT目录),再重启就没问题。 总结:问题原因未找到,推测是启动ROOT报错(我ROOT目录是空目录),为什么会报错,不知道,谁知道@我。 问题解决方法:删除webapps下无关的目录,删除conf/Catalina/localhost/下无关文件。
Kuzicalala 2014-03-15
  • 打赏
  • 举报
回复
Since version 6.0.24, Tomcat ships with a memory leak detection feature, which in turn can lead to this kind of warning messages when there's a JDBC 4.0 compatible driver in the webapp's /WEB-INF/lib which auto-registers itself during webapp's startup using the ServiceLoader API, but which did not auto-deregister itself during webapp's shutdown. This message is purely informal, Tomcat has already taken the memory leak prevention action accordingly. What can you do? Ignore those warnings. Tomcat is doing its job right. The actual bug is in someone else's code (the JDBC driver in question), not in yours. Be happy that Tomcat did its job properly and wait until the JDBC driver vendor get it fixed so that you can upgrade the driver. Downgrade to Tomcat 6.0.23 or older so that you will not be bothered with those warnings. But it will silently keep leaking memory. Not sure if that's good to know after all. Those kind of memory leaks are one of the major causes behind OutOfMemoryError issues during Tomcat hotdeployments. Move the JDBC driver to Tomcat's /lib folder and have a connection pooled datasource to manage the driver. Note that Tomcat's builtin DBCP does not deregister drivers properly on close. See also bug DBCP-322. The DBCP project is however currently stalling. I wouldn't expect quick updates. You would rather like to replace DBCP by another connection pool which is doing its job better then DBCP. For example BoneCP or Tomcat JDBC Pool maybe?
小诩 2013-10-09
  • 打赏
  • 举报
回复
我用win7也是,是在tomcat关闭时出现的报错,请问这使怎么回事啊
kimtaeh 2013-05-08
  • 打赏
  • 举报
回复
我也遇到了,请问LZ解决了吗?能不能分享一下

5,655

社区成员

发帖
与我相关
我的任务
社区描述
Web开发应用服务器相关讨论专区
社区管理员
  • 应用服务器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧