Bamboo fails to start up - Failed to run pre-bootstrap upgrade tasks, multiple entries in the HIBERNATE_UNIQUE_KEY

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

Problem

Bamboo is failing to start up and the following error message can be found inside the <bamboo-home-directory>/logs/atlassian-bamboo.log file:

1 2 2015-11-17 19:50:22,327 INFO [localhost-startStop-1] [AbstractUpgradeManager] Completed task 4300 with errors. 2015-11-17 19:50:22,327 FATAL [localhost-startStop-1] [DefaultBootstrapManager] Pre-bootstrap validation tests failed: [Task for build 4300 failed:, com.atlassian.bamboo.upgrade.tasks.validation.ThereIsSingleRowInHibernateUniqueKeyTable: multiple entries in the HIBERNATE_UNIQUE_KEY table]

Diagnosis

Run the following SQL query against your Bamboo database:

1 select * from HIBERNATE_UNIQUE_KEY;

This will return the value of the next_hi column.

Cause

There are several values under the next_hi column inside the HIBERNATE_UNIQUE_KEY table, whereas there should be only one, so Bamboo reports the following error:

1 multiple entries in the HIBERNATE_UNIQUE_KEY table

Solution

Workaround

The workaround is to remove the additional entries inside the HIBERNATE_UNIQUE_KEY table directly from the database.

  1. Shutdown Bamboo.

  2. Run the following SQL query in your Bamboo database:

    1 select * from HIBERNATE_UNIQUE_KEY;
  3. This will return something like this (values may vary):

    1 2 3 4 5 6 7 8 9 10 select * from HIBERNATE_UNIQUE_KEY; next_hi --------- 3997 13 3997 3997 3997 3999 (6 rows)
  4. Choose the higher value from the result of the previous SQL query and run the following delete:

    (!) Always backup your database before applying any changes.

    1 delete from HIBERNATE_UNIQUE_KEY where next_hi < 3999; 

    This will delete all values lower than 3999 from the next_hi column inside the HIBERNATE_UNIQUE_KEY table.

  5. Run the SQL query from Step 2 again to make sure there's only one value now:

    1 2 3 4 5 select * from HIBERNATE_UNIQUE_KEY; next_hi --------- 3999 (1 row)
  6. Start Bamboo.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.