Jira Data Center Tomcat service does not restart after an application hang
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Jira running as Tomcat service in Windows fails to restart after a problem is detected, and Jira continues unresponsive continues unresponsive after the restart.
Jira restart failed because there were locked files by the process which was still active but not responding to requests.
Environment
Jira 8.x, 9.x
Diagnosis
Jira restart failed because there were locked files by the process which was still active but not responding to requests.
Cause
There is a locking error which is logged and startup is failed, the logs will show something similar to this:
1
2
2023-06-03 21:13:22,075-0400 JIRA-Bootstrap ERROR [c.a.jira.startup.ComponentContainerLauncher] A fatal error occurred during initialisation. JIRA has been locked.
com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: F:\JIRA\plugins\.osgi-plugins\felix
Solution
When the Tomcat process is still running in Windows and Jira is not responding, the correct action is *NOT* a service restart. The service restart fails to shut down Jira and then the new startup is failed. The correct action is to take thread dumps (or rely on JFR if the crash is within the capture period), shut down the JVM (stop the Tomcat service), wait for the JVM to exit and then start up the service again:
1
2023-06-03 22:19:13,730-0400 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger]
Was this helpful?