データベースでユーザーが重複しているため、Confluence をアップグレードできない

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Failed to upgrade to 7.1 and onwards as the cwd_user has some duplicated records. During the upgrade, an attempt is made to add unique constraint to the table, and it eventually fails with OutOfMemoryError.

環境

6.13.10

診断

The following error appears before the upgrade is stopped:

INFO [Catalina-utility-1] [internal.upgrade.constraint.UniqueConstraintAddition] addIfMissing Constraint [cwd_user_name_dir_id] not found on table [cwd_user]. Adding it soon.

Verify if you have duplicated records with below SQL query:

SELECT lower_user_name, directory_id, count(*) 
FROM cwd_user 
GROUP BY lower_user_name, directory_id HAVING count(*) > 1;

原因

The unique constraint added with the following bug fix on 7.1:

As the cwd_user has large duplicated records, adding the unique constraint to the table was failed.

ソリューション

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

The issue can be fixed by removing the duplicated records with the following SQL query:

DELETE FROM cwd_user 
WHERE id NOT IN (SELECT MIN(id) FROM cwd_user GROUP BY lower_user_name, directory_id);

Then, try to upgrade the Confluence again.

最終更新日: 2024 年 12 月 20 日

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

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