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


After stopping confluence via stop Confluence says, in the logs, that it is stopping, as below:

but the java process never terminates.


Pass the -force parameter to as:

This will kill the java process and stop Confluence.

If the above results in an error, such as:

Please add the following line of code to the top of your <Confluence-Installation-Directory>/bin/ file (Standalone instance):

Tomcat will automatically write its process id to in your specified path and kill its process with the -force parameter.

For Linux or Mac user:
In addition to the above, you can try a custom script that runs first before forcing Tomcat to shutdown. This script will sleep 60 seconds then look inside ./ to check if Tomcat is still running. If Tomcat is still running, it will issue a stop -force.

The script needs to be saved in <confluence install>/bin and assumes is located in the same location.

(info) Note that this script is provided as is and not supported.

Finding the Root Cause of Shutdown Problems

If you're interesting in tracking down the root cause of the problem, your best option is to:

  1. Attempt to shut down your application server
  2. Take 3-5 thread dumps spaced 1 minute apart.
  3. Look through the thread dumps to see what threads are still active after 5 minutes.
  4. If you need help analyzing the thread dump output, send your updated application server logs to Atlassian Support.
Help us improve!

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





























  1. Is this something that will ever be fixed as part of Confluence release?

    At present we have to implement the fix after every upgrade which is mildly annoying.

    1. We're pretty sure it's not a Confluence bug (rather it's an environment issue), but we don't yet know a root cause for this problem. We're still investigating it.

      1. If it helps any, our environment is as follows:

        Confluence 3.0.2

        MySQL JDBC driver 5.1.7

        Ubuntu 9.04

        Confluence System Information Page Details:


        Confluence Home



        6 days, 13 hours, 27 minutes, 27 seconds

        Confluence Version


        Build Number


        Support Entitlement Number


        Daily XML Backup



        System Information

        System Date

        Wednesday, 18 Nov 2009

        System Time


        System Favourite Colour

        Lemon chiffon

        Java Version


        Java Vendor

        Sun Microsystems Inc.

        JVM Version


        JVM Vendor

        Sun Microsystems Inc.

        JVM Implementation Version


        Java Runtime

        Java(TM) SE Runtime Environment

        Java VM

        Java HotSpot(TM) Client VM

        Java Input Arguments

        -Xms512m -Xmx1024m -XX:MaxPermSize=256m -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/atlassian/confluence/confluence/conf/ -Djava.endorsed.dirs=/usr/local/atlassian/confluence/confluence/endorsed -Dcatalina.base=/usr/local/atlassian/confluence/confluence -Dcatalina.home=/usr/local/atlassian/confluence/confluence

        User Name


        System Language


        System Timezone


        Operating System

        Linux 2.6.28-15-server

        OS Architecture


        Filesystem Encoding


        Application Server Working Directory


        Temp Directory


        Application Server

        Apache Tomcat/6.0.14

        Servlet Version


        Server Base Url


        Java VM Memory Statistics

        Total Memory

        613 MB

        Free Memory

        84 MB

        Used Memory

        528 MB

        Memory Graph






          14 % Free



        Database Information

        Database Dialect


        Database Connection URL


        Database Driver Name


        Database Driver Version


        Database Connection Transaction Isolation

        Read committed

        Database name


        Database version


        Database Latency

        0 ms

        Application Server

        Apache Tomcat/6.0.14

        Servlet Version


        Server Base Url

  2. To my experience with many different installations, all similar symptoms were due to problems with the database connection, not with JIRA or Confluence. eg. trying to start a just stopped system. The Database socket isn't closed yet, and occupied. Then java must be killed. Tipp. Don't hurry, just wait a few (5-10) seconds after stopping, then do the start.

  3. Tomcat without Confluence deployed will shut down.  A thread dump with the shutdown of Tomcat with Confluence shows threads waiting on objects, at org.quartz.simpl.SimpleThreadPool.getNextRunnable(
            - locked <0x00002aaac7c1fd50> (a java.lang.Object)

    - waiting on <0x00002aaacb587c70> (a org.apache.tomcat.util.threads.ThreadPool$ControlRunnab

            - locked <0x00002aaacf6f2ee8> (a$Worker)

  4. We have this same issue here on our site.  I've been manually killing these processes on our Solaris environment.  It appears to occur after using the Confluence Daily Backup.

  5. It's just a little embarrassing but I don't know how to construct a specific for the template:

    CATALINA_PID="<Change this to your preferred location>/"export CATALINA_PID

    Is "" a file. Do you have to create a blank file first?

    Should it be something like:

    /var/run/ ????

    Thanks for the extra help!

    1. Hi Todd,

      You can just create a blank file with that name, and it should get populated.

  6. According to the readme RUNNING.txt packaged with Tomcat 6 and the Confluence installation steps we should be using, and

    Just from what I can see, does a bunch of things and then calls

    This does not solve the problem though. I have setup 5 different Ubuntu configurations, 9.10 and 10.10 with PostgreSQL, virtual and not virtual and run into this problem every time.

    It has actually been years since this has been fixed. I can tell you that some admins I have introduced Confluence to chose not to adopt Confluence simply because of this bug.

    From what I can tell, "Benjamin White" took the stock Confluence, removed it and was able to shutdown and startup the packaged tomcat. This points to an issue with Confluence code. The only thing I can think of is to check and ensure that the servlet destroy methods are releasing the database connections.

  7. I tried all suggestions but on Mac-Server it always leaves a bunch of java processes running and does not fully shutdown.

    If I use suggested scripts right after I have started confluence they do work – all of them.

    But after a few minutes of working on confluences it seems to be that a shutdown command is not able to force a full release of all connections to ports and files which you can see as left open if you look at the activity statistics and take a glance at the java processes still running after shutdown.

    I do start a script to shut down confluence and than I shutdown all Java opened connections to files and ports – I never have had any problem restarting confluence after such a manual forced shutdown. 

    It seems to be a confluence bug – someone of the Atlassian tech-writers should take all this data of this page and put it into an corresponding issue.

    1. Klaus and Tim,

      Thank you! I had made this kb article based on what appears to be an incorrect assumption, that it was an environment factor. I've asked our development team to take a look and when we have more specific info (and hopefully a set of specific ways to replicate), we'll indeed open a bug report. Stay tuned...

  8. What happens during shutdown - "CONFLUENCE-INSTALL/bin/" executes the "" script (in the same directory).
    "" does the heavy lifting required to shutdown the Tomcat process, but it requires CATALINA_PID exist and be correctly set.  

    The last line of "" execs (calls) "" and passes arguments.  While the shell command "exec" starts a new process, it has the undesirable side effect of stripping previously set environment variables, like CATALINA_PID. CATALINA_PID is required for the Tomcat shutdown process to proceed using the code in the "" script.  If you have a shutdown script that sets CATALINA_PID and calls "", the shutdown will fail.

    Setting and exporting CATALINA_PID in the "CONFLUENCE-INSTALL/bin/" script fixes the problem.  This file is sourced (included) by the "" script (~ line 120), making any environment variables set in this file available to "".

    export CATALINA_PID

    When Confluence is started, the "" file is created in the directory shown.  It contains the PID (process id) number of the Confluence process.  The startup/shutdown scripts use the existence of this file to prevent multiple instances from running (bad).  The shutdown script uses the process id number contained in this file to stop the process.

    Note that CATALINA_PID is an absolute filename, with full path included.  I have created a "run" directory under my CONFLUENCE-HOME (confluence runtime data) and given the confluence user ownership of this directory.  You should have unique pid filenames and/or locations if you are running multiple standalone installations of Confluence/Jira/Crowd on the same machine.

    One possible fix to version upgrades clobbering "" is to modify the "" script to look in locations outside of the CONFLUENCE-INSTALL directory.  IMHO, the scattered configuration files are the most troublesome part of installing and maintaining this family of products.

  9. Hi Otto,

    Wow, good write-up. I will read through it give it a try.

    To the Confluence team, have you tried this?

    If you are having trouble replicating this problem, you can quickly setup Confluence standalone on Ubuntu using the Rackspace or Slicehost Cloud environments.

    1. Hi Tin,

      To the Confluence team, have you tried this?

      This has been tried and the work around was suggested in this KB.

      In addition, I have filed a report in as to include the work around in our releases.

      Let me know if there's anything else I can help with.

      Kind Regards,

      Roy Hartono