Multiple entries with same key error while syncing from external user directory

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

要約

Syncing from an external user directory shows Multiple entries with same key error in the logs. The last synchronization status at the Cog icon > Overview > User Directories page mentions: "Synchronisation failed. See server logs for details."

環境

Bamboo 7.x versions

Related to: 

BAM-20735 - Getting issue details... STATUS

BAM-21700 - Getting issue details... STATUS

CWD-5182 - Getting issue details... STATUS


診断

java.lang.IllegalArgumentException: Multiple entries with same key errors can be found at the atlassian-bamboo.log file:

java.lang.IllegalArgumentException: Multiple entries with same key: 
[
	id=1234,
	name=newuser,
	createdDate=2020-11-06 09:46:07.0,
	updatedDate=2020-11-06 09:46:07.0,
	emailAddress=new.user@email.com,
	firstName=New,
	lastName=User,
	displayName=New User,
	lowerName=nuser,
	directoryId=123456789,
	externalId=123:0ce0e16489003840a44430bf8201bba5
] 

[
	id=5678,
	name=olduser,
	createdDate=2020-03-16 13:12:03.0,
	updatedDate=2020-10-30 17:46:14.0,
	emailAddress=old.user@email.com,
	firstName=Old,
    lastName=User,
	displayName=Old User,
	lowerName=ouser,
	directoryId=123456789,
	externalId=123:0ce0e16489003840a44430bf8201bba5
]

原因

This error is caused by a change to one or more of the following user's information in the external user directory:

  • name
  • first name
  • last name
  • メール アドレス

ソリューション

  1. Stop Bamboo.
  2. Backup Bamboo database.
  3. Get the old user id from the message found in the atlassian-bamboo.log.
  4. Run the following queries against the Bamboo database:

    DELETE FROM CWD_USER_ATTRIBUTE
    WHERE USER_ID = 5678;
    
    DELETE FROM CWD_MEMBERSHIP 
    WHERE CHILD_ID = 5678;
    
    DELETE FROM CWD_USER_CREDENTIAL_RECORD
    WHERE USER_ID = 5678;
    
    DELETE FROM CWD_USER
    WHERE ID = 5678;

    Replace 5678 with the old user id found in the atlassian-bamboo.log

  5. Start Bamboo back


最終更新日 2022 年 6 月 29 日

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

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