LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Tomcat 6 error: Timer already cancelled (http://www.linuxquestions.org/questions/linux-server-73/tomcat-6-error-timer-already-cancelled-814369/)

deesto 06-15-2010 07:41 PM

Tomcat 6 error: Timer already cancelled
 
I started seeing error log entries to this effect once we ported a Tomcat webapp, which connects to a remote database,
from Tomcat 5 to Tomcat 6.0.26, but it seemed relatively harmless until now. The error we got at first was:

Code:

May 5, 2010 2:36:44 PM org.apache.catalina.loader.WebappClassLoader
clearReferencesStopTimerThread
SEVERE: A web application appears to have started a TimerThread named [Timer-7]
via the java.util.Timer API but has failed to stop it. To prevent a memory leak,
the timer (and hence the associated thread) has been forcibly cancelled.

A restart seemed to cure the server at that point. But now it has died silently: though the process itself was running, the service become unavailable. Entries like this were found in the logs:

Code:

06/15/10 15:05:47.685 EDT -0400 id=1 Error acquiring database:
java.lang.IllegalStateException: Timer already cancelled.
        at java.util.Timer.sched(Timer.java:354)
        at java.util.Timer.schedule(Timer.java:222)
        at
org.apache.tomcat.dbcp.pool.impl.EvictionTimer.schedule(EvictionTimer.java:64)
        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.startEvictor(GenericObjectPool.java:1647)
        at
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.setTimeBetweenEvictionRunsMillis(GenericObjectPool.java:843)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1173)
        at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
        at
gov.fnal.frontier.DbConnectionMgr.acquire(DbConnectionMgr.java:172)
        at
gov.fnal.frontier.PluginDataObject.fdo_start(PluginDataObject.java:65)
        at gov.fnal.frontier.Payload.start(Payload.java:110)
        at
gov.fnal.frontier.FrontierServlet.service(FrontierServlet.java:166)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:619)

It looks like this may be a bug/feature since 6.0.24:
http://wiki.apache.org/tomcat/Memory...monClassLoader

Any thoughts on what the real problem is, and whether we can work around it, or need to revert to Tomcat 5?

Thank you!

deesto 06-16-2010 11:55 AM

Hmmm. Well, is anyone running a Tomcat version < 6.0.24 and can confirm that they do _not_ see these errors anywhere in their logs? I'd hate to downgrade, but if it would help alleviate these problems....

deesto 06-17-2010 10:10 AM

As it happens, this problem is due to a bug in the current version of Tomcat:
https://issues.apache.org/bugzilla/s...g.cgi?id=48971

It looks like my options are to downgrade, or to wait for v.6.0.27, or to manually patch my Tomcat instances.

Thanks for the help!


All times are GMT -5. The time now is 02:33 AM.