Primary lock is held by another instance is logged on passive nodes in Bamboo

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

The below log line is printed in the $BAMBOO_HOME/atlassian-bamboo.log  on a secondary passive node in a Bamboo DC setup and may continue even after the primary has been shutdown:

1 2 3 2021-08-01 12:01:00,246 INFO [localhost-startStop-1] [ClusterLockBootstrapServiceImpl] Primary lock is held by another instance, suspending.... 2021-08-01 12:02:00,821 INFO [localhost-startStop-1] [ClusterLockBootstrapServiceImpl] Primary lock is held by another instance, suspending.... 2021-08-01 12:03:00,819 INFO [localhost-startStop-1] [ClusterLockBootstrapServiceImpl] Primary lock is held by another instance, suspending....

Solution

This is a normal part of Bamboo DC (8.0)'s active-passive locking configuration. The active node will claim a database lock for 5 minutes and continuously updates this lock while it is online. Even after the primary goes down or is shutdown, the lock will remain in place for 5 minutes to give the primary a chance to reclaim it (e.g. in the event of a restart). Once 5 minutes has elapsed, the lock is available to be claimed by another node.

This was tracked in a feature request, and was fixed in version 9.6.0:

Updated on February 28, 2025

Still need help?

The Atlassian Community is here for you.