You're visiting the Confluence Knowledge Base. Visit the Confluence Knowledge Base Home for an overview.

Skip to end of metadata
Go to start of metadata

Symptoms

When starting up Tomcat (6.0.26 or higher), the log file reports that Catalina started with no issues:

When shutting down Tomcat, Catalina reports multiple threads have failed to stop:

Causes

There is a memory leak detection feature introduced in Tomcat 6.0.25 that attempts to log objects that have failed to be unregistered by webapps it hosts when they are stopped, and were forcibly unregistered by Tomcat. As Tomcat is forcibly removing these objects, it is not a serious concern that these log messages occur.

These errors will also appear during startup if your JDBC driver is not in the correct location on startup. If you are using a datasource, be sure to copy the JDBC drive to <confluence-install>/lib. If the issue persists, verify that you are able to authenticate against your database with the credentials supplied in your <confluence-home>/confluence.cfg.xml in the Hibernate connection settings.

Despite their apparent severity, these log messages are benign and can be safely ignored.

Resolution

There is no resolution at this time. There is an improvement request to reduce these harmless messages in the log during Confluence shutdown, which is being tracked at  CONF-22879 - Reduce errors logged when shutting down Confluence Open .

Workaround

As of this writing, the solution is to downgrade. Users can install Tomcat 6.0.20 as a workaround.

This workaround is not recommended as Tomcat 6.0.20 has known performance issues, and has several security vulnerabilities. We recommend customers upgrade to (or continue to run) Tomcat 6.0.32 or higher.

Help us improve!

Is this article helpful?
Is it well written?
Is the content complete?

6 Comments

  1. Confluence 3.3.1 Standalone Edition currently comes with Tomcat 6.0.26 bundled. If you are experiencing this issue during startup and have determined that it is not related to a JDBC driver or DB authentication issue, please open a support request at http://support.atlassian.com.

  2. Under the server.xml you can find the listener for this and disable it. I have no idea if this will cause problems in the long run, however it will at least let you get through startup without having to downgrade.

    Note: My setup is running Confluence 3.1 on Ubuntu Server. I experienced these startup issues when upgrading from Ubuntu 9.10 to 10.04.

  3. In Windows, I am unable to restart Confluence after shutting it down (using /bin/shutdown.bat).  I receive many ThreadLocal errors.  I'm using Tomcat 6.0.26 and would prefer not to downgrade back to 6.0.20.

    @Martin, being new to java, where would I place the 'listener' node inside the server.xml file?

    Thanks,

    1. The listener node for me was at the top of the Server.xml already. I did not add it, I commented it out to disable it. My setup is on Linux though, not Windows, so I am not sure what is there for you by default.

  4. Hello,

     

    I am having the higher version of tomcat 7.0.21-1.i386 on my system and still i am facing the same issue. Below are the logs

     

     

    ]$ /etc/init.d/tomcat stop

    Using CATALINA_BASE:   /opt/NSN/apache-tomcat

    Using CATALINA_HOME:   /opt/NSN/apache-tomcat

    Using CATALINA_TMPDIR: /opt/NSN/apache-tomcat/temp

    Using JRE_HOME:        /opt/NSN/java

    Using CLASSPATH:       /opt/NSN/apache-tomcat/bin/bootstrap.jar:/opt/NSN/apache-tomcat/bin/tomcat-juli.jar

    Oct 18, 2013 10:49:35 AM org.apache.catalina.startup.Catalina stopServer

    SEVERE: Catalina.stop:

    java.net.ConnectException: Connection refused

            at java.net.PlainSocketImpl.socketConnect(Native Method)

            at java.net.PlainSocketImpl.doConnect(Unknown Source)

            at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

            at java.net.PlainSocketImpl.connect(Unknown Source)

            at java.net.SocksSocketImpl.connect(Unknown Source)

            at java.net.Socket.connect(Unknown Source)

            at java.net.Socket.connect(Unknown Source)

            at java.net.Socket.<init>(Unknown Source)

            at java.net.Socket.<init>(Unknown Source)

            at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:457)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

            at java.lang.reflect.Method.invoke(Unknown Source)

            at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:371)

            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:452)

     

  5. Hi, 

    I use crowd for authentication of JIRA and confluence. After i installed crowd, i tried integrating with JIRA and confluence. It worked fine. Now i am trying to integrate crowd with SSL but am getting an error when i start crowd after configuration changes

     

    SEVERE: Error listenerStart
    Jul 18, 2014 10:16:30 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/openidclient] startup failed due to previous errors
    Jul 18, 2014 10:16:30 AM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor C:\CROWD_INSTALL\apache-tomcat\conf\Catalina\localhost\openidserver.xml
    Jul 18, 2014 10:16:41 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error listenerStart
    Jul 18, 2014 10:16:41 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/openidserver] startup failed due to previous errors
    Jul 18, 2014 10:16:41 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
    SEVERE: The web application [/openidserver] appears to have started a thread named [HSQLDB Timer @615e57fe] but has failed to stop it. This is very likely to create a memory leak.
    Jul 18, 2014 10:16:41 AM org.apache.catalina.startup.HostConfig deployDirectory

     

    this is from log localhost in apache-tomcat

     

    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'crowdProvider' defined in class path resource [applicationContext-OpenIDServer.xml]: Cannot resolve reference to bean 'serverManager' while setting bean property 'serverManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverManager' defined in class path resource [applicationContext-OpenIDServer.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.openid4java.server.ServerManager]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Failure initializing default SSL context

     

    And i get out of memory exception in tomcat command window

     

    INFO: Cookies: Invalid cookie. Value not a token or quoted value
    Note: further occurrences of Cookie errors will be logged at DEBUG level.
    Exception in thread "http-bio-8443-Acceptor-0" Exception in thread "http-bio-844
    3-exec-5"
    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler i
    n thread "http-bio-8443-Acceptor-0"

    Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler i
    n thread "http-bio-8443-exec-5"
    Exception in thread "http-bio-8443-exec-6" Exception in thread "http-bio-8443-ex
    ec-4"

     

     

    Any idea what am doing wrong here?