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

お困りですか?

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

コミュニティに質問

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

問題

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.

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

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

    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.
    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:

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

最終更新日 2016 年 4 月 14 日

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

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