Unable to upgrade Confluence with relation already existing in the database

お困りですか?

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

コミュニティに質問

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

問題

If you've already attempted an upgrade of Confluence, re-attempting the upgrade can cause the following error in the atlassian-confluence.log

2016-09-01 18:50:38,600 ERROR [localhost-startStop-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentIndexUpgradeTask@765a389f failed during the UPGRADE phase due to: StatementCallback; bad SQL grammar [create index c_si_ct_pv_cs_cd_idx on CONTENT (SPACEID, CONTENTTYPE, PREVVER, CONTENT_STATUS, CREATIONDATE)]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "c_si_ct_pv_cs_cd_idx" already exists
com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.ContentIndexUpgradeTask@765a389f failed during the UPGRADE phase due to: StatementCallback; bad SQL grammar [create index c_si_ct_pv_cs_cd_idx on CONTENT (SPACEID, CONTENTTYPE, PREVVER, CONTENT_STATUS, CREATIONDATE)]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "c_si_ct_pv_cs_cd_idx" already exists

原因

Confluence is trying to create an index that should not yet exist, but is present from the previous upgrade attempt. The database was not rolledback completly.

ソリューション

Remove the existing relation mentioned in the logs:

  1. Confluence をシャットダウンします。
  2. Remove the mentioned item from your database. In this case it was the c_si_ct_pv_cs_cd_idx index. Replace with the <generic-index-name> mentioned in your error:

    データベースの変更を行う場合は必ず事前にバックアップを取得してください。

    drop index c_si_ct_pv_cs_cd_idx;
  3. Confluence を起動します。

  4. Attempt the upgrade again

 

最終更新日 2016 年 9 月 10 日

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

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