Jira Data Center Tomcat service does not restart after an application hang
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
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.
環境
Jira 8.x, 9.x
診断
Jira restart failed because there were locked files by the process which was still active but not responding to requests.
原因
There is a locking error which is logged and startup is failed, the logs will show something similar to this:
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
ソリューション
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:
2023-06-03 22:19:13,730-0400 JIRA-Bootstrap INFO [c.a.jira.startup.JiraStartupLogger]