Bamboo Data Center fails to stop showing error "Kill failed: $CATALINA_PID not set"
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
The error message "Kill failed: $CATALINA_PID not set" is shown when attempting to stop the Bamboo process before it has fully started.
環境
The solution has been validated in Bamboo 9.6 but may be applicable to other versions.
診断
When Bamboo is started, it typically creates a PID (Process ID) file to keep track of the running process. This PID file is referenced during stop operations to identify which process to terminate. If the process has not yet fully started and the PID file does not exist, stopping the process will fail, leading to the error message stating that the PID is not set.
/bamboo-install/atlassian-bamboo-9.6.1/bin » ./stop-bamboo.sh
Bamboo Data Center
Version : 9.6.1
If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo
Using CATALINA_BASE: /bamboo-install/atlassian-bamboo-9.6.1
Using CATALINA_HOME: //bamboo-install/atlassian-bamboo-9.6.1
Using CATALINA_TMPDIR: /bamboo-install/atlassian-bamboo-9.6.1/temp
Using JRE_HOME: /opt/homebrew/Cellar/openjdk@11/11.0.24
Using CLASSPATH: /bamboo-install/atlassian-bamboo-9.6.1/bin/bootstrap.jar:/bamboo-install/atlassian-bamboo-9.6.1/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Xms1024m -Xmx1024m -XX:+UseG1GC -Dsecure.tunnel.upstream.port=8093 --add-opens java.base/java.security=ALL-UNNAMED
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Aug 09, 2024 2:53:07 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Could not contact [localhost:8007] (base port [8007] and offset [0]). Tomcat may not be running.
Aug 09, 2024 2:53:07 PM org.apache.catalina.startup.Catalina stopServer
SEVERE: Error stopping Catalina
java.net.ConnectException: Connection refused (Connection refused)
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.base/java.net.Socket.connect(Socket.java:609)
at java.base/java.net.Socket.connect(Socket.java:558)
at java.base/java.net.Socket.<init>(Socket.java:454)
at java.base/java.net.Socket.<init>(Socket.java:231)
at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:629)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:393)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
Kill failed: $CATALINA_PID not set
原因
The error occurs because the stop command is issued before the Bamboo process has had a chance to create the PID file. In other words, the startup sequence has not completed, and thus, the necessary environment variable ($CATALINA_PID) has not been set.
ソリューション
Wait for Full Startup: Ensure that Bamboo has fully started before attempting to stop it. You can check the startup logs to confirm that the process is running and the PID file has been created.