Bamboo fails to start up - Failed to run pre-bootstrap upgrade tasks, multiple entries in the HIBERNATE_UNIQUE_KEY
プラットフォームについて: 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 は除く
問題
Bamboo is failing to start up and the following error message can be found inside the <bamboo-home-directory>/logs/atlassian-bamboo.log
file:
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]
診断
Run the following SQL query against your Bamboo database:
select * from HIBERNATE_UNIQUE_KEY;
This will return the value of the next_hi
column.
原因
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:
multiple entries in the HIBERNATE_UNIQUE_KEY table
回避策
The workaround is to remove the additional entries inside the HIBERNATE_UNIQUE_KEY
table directly from the database.
- Shutdown Bamboo.
Run the following SQL query in your Bamboo database:
select * from HIBERNATE_UNIQUE_KEY;
This will return something like this (values may vary):
select * from HIBERNATE_UNIQUE_KEY; next_hi --------- 3997 13 3997 3997 3997 3999 (6 rows)
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.delete from HIBERNATE_UNIQUE_KEY where next_hi < 3999;
This will delete all values lower than 3999 from the
next_hi
column inside theHIBERNATE_UNIQUE_KEY
table.Run the SQL query from Step 2 again to make sure there's only one value now:
select * from HIBERNATE_UNIQUE_KEY; next_hi --------- 3999 (1 row)
Start Bamboo.