How to stop Bamboo from shutting itself down and restarting

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

要約

If the Bamboo Server or Agents are shutting down and restarting multiple times during the day, there might be a problem with Bamboo's service wrapper.

環境

  • Bamboo Server (running as a service on Windows)
  • Bamboo Agents (Remote/Elastic)

調査

Bamboo Server (running from the command line or running as a Windows service) starts up fine, but after some random period, the wrapper fails and kills the Bamboo instance. The same behavior can happen to Bamboo remote agent if the wrapper is used. These errors might be logged:

..
ERROR  | wrapper  | 2012/09/12 10:44:34 | JVM appears hung: Timed out waiting for signal from JVM.
ERROR  | wrapper  | 2012/09/12 10:44:34 | JVM did not exit on request, terminated

または

INFO   | wrapper  | 2009/01/28 15:24:34 | Wrapper Process has not received any CPU time for 11 seconds.  Extending timeouts.
..
INFO   | jvm 1    | 2009/01/28 15:28:17 | 2009-01-28 15:28:17,299 INFO [ActiveMQ ShutdownHook] [TransportConnector] Connector vm://bamboo Stopped
INFO   | jvm 1    | 2009/01/28 15:28:17 | 2009-01-28 15:28:17,721 INFO [ActiveMQ ShutdownHook] [BrokerService] ActiveMQ JMS Message Broker (bamboo, ID:BSYTEST5-4449-1233174172549-1:0) stopped
STATUS | wrapper  | 2009/01/28 15:28:18 | <-- Wrapper Stopped

原因

Bamboo's service wrapper comes with a timeout that specifies the interval at which the JVM is pinged. A response is expected during that interval. If the JVM is too busy, it will not respond to the ping in time.

wrapper.ping.timeout defines the timeout in seconds. 0 means that it will never time out. The default value of this setting is 30 seconds.

ソリューション

Increase the timeout in the wrapper's configuration. To do this, add the following line to the <bamboo-install>/conf/wrapper.conf file if it does not exist and restart the Bamboo instance (the same can be done for a Bamboo remote agent by editing the <bamboo-agent-home>/conf/wrapper.conf file if the Remote Agent is having the same problem).

wrapper.ping.timeout=90 // Reports after 90 seconds of inactivity
wrapper.ping.timeout=0  // Disables the timeout check 

You can also disable the restart action and still keep the ping checks:

wrapper.ping.timeout.action=NONE     // Do nothing
wrapper.ping.timeout.action=DUMP     // Invoke a thread dump
wrapper.ping.timeout.action=STATS    // Print performance statistics

More options can be found here:

If any elastic agents are running, ensure that they are shut down before restarting the Bamboo server. If the elastic instances are not shutdown before restarting, they will continue to run and become orphaned from your Bamboo server.

最終更新日 2023 年 9 月 20 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.