-
Bug
-
Resolution: Fixed
-
High
-
None
-
None
-
126
-
Minor
-
2
Summary
When we perform a site restoration on Jira, it would wipe out all data, including the users
Please note that this process will delete all existing Jira data in your site and replace it with data from the selected file.
However, we found the existing users are not deleted. Hence, it shows "UserAlreadyExists" when Jira tries to create the account for the same user who exists on both source and destination instance (especially the default add-on users).
Environment
- Cloud -> Cloud restoration
- Server -> Cloud restoration
Steps to Reproduce
- Take a backup of a Jira Cloud
- Restore it on the same instance
Expected Results
Restoration completes successfully.
Actual Results
It shows error:
Error importing data: com.atlassian.jira.log.clean.PrivacySafeException: Privacy-safe boxing of a com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper$WrappingCrowdException
Application logs:
com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper$WrappingCrowdException: {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"status":"409","scimType":"uniqueness","detail":"Duplicate email address: add-on@connect.atlassian.com","errorType":"UserAlreadyExists","message":"Duplicate email address: add-on@connect.atlassian.com","data":"add-on@connect.atlassian.com"} at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.transferUsersToCrowd(UsersAndGroupsImportHelper.java:338) at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.transferUsersToCrowd(UsersAndGroupsImportHelper.java:255) at com.atlassian.jira.bc.dataimport.identity.IdentityImportHelper.performMigration(IdentityImportHelper.java:134) at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.performTasksOnImportDb(CloudImportTaskRunner.java:397) at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.performTasksOnImportDb(CloudImportTaskRunner.java:485) at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.lambda$null$1(CloudImportTaskRunner.java:223) at com.atlassian.connpool.impl.AbstractConnectionPoolProvider.withPrivatePool(AbstractConnectionPoolProvider.java:133) at com.atlassian.jira.connpool.JiraViburConnectionPoolProvider.withPrivatePool(JiraViburConnectionPoolProvider.java:131) at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$null$0(AbstractBackupTaskRunner.java:63) at java.util.Optional.map(Optional.java:215) at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$runWithSeparateContextAsync$1(AbstractBackupTaskRunner.java:62) at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: com.atlassian.crowd.exception.runtime.OperationFailedException: com.atlassian.idp.client.exceptions.UserAlreadyExistsException: {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"status":"409","scimType":"uniqueness","detail":"Duplicate email address: add-on@connect.atlassian.com","errorType":"UserAlreadyExists","message":"Duplicate email address: add-on@connect.atlassian.com","data":"add-on@connect.atlassian.com"} at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.withRetry(DefaultIdpSafeOperations.java:167) at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.importUser(DefaultIdpSafeOperations.java:150) at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.createNewUserWithGroupMemberships(UsersAndGroupsImportHelper.java:377) at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.transferUsersToCrowd(UsersAndGroupsImportHelper.java:331) ... 14 more Caused by: com.atlassian.idp.client.exceptions.UserAlreadyExistsException: {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"status":"409","scimType":"uniqueness","detail":"Duplicate email address: add-on@connect.atlassian.com","errorType":"UserAlreadyExists","message":"Duplicate email address: add-on@connect.atlassian.com","data":"add-on@connect.atlassian.com"} at com.atlassian.idp.client.IdentityPlatformClientImpl.mapStatusCodeException(IdentityPlatformClientImpl.java:681) at com.atlassian.idp.client.IdentityPlatformClientImpl.mapInputStream(IdentityPlatformClientImpl.java:602) at com.atlassian.idp.client.IdentityPlatformClientImpl.makeRequestWithEntityBody(IdentityPlatformClientImpl.java:576) at com.atlassian.idp.client.IdentityPlatformClientImpl.importUser(IdentityPlatformClientImpl.java:418) at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.lambda$importUser$2(DefaultIdpSafeOperations.java:150) at com.atlassian.jira.util.retry.Retryer$Retriable.call(Retryer.java:80) at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.withRetry(DefaultIdpSafeOperations.java:160) ... 17 more
Notes
- The bug most likely to happen on Cloud -> Cloud restoration because all Jira Cloud instances come some default add-on users. Eg: Trello user
- This bug also happens to normal users if the user is already invited to the destination instance.
Workaround
- Remove the add-on users and/or user who exists on destination Cloud instance from the backup file; OR
- Contact Atlassian Support to manually delete the add-on users
- duplicates
-
JRACLOUD-71702 Import from another Jira instance fails with duplicated user error.
-
- Closed
-
- mentioned in
-
Page Failed to load
-
Page Failed to load
-
Page Failed to load
-
Page Failed to load
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
Hi, bbertechini@atlassian.com / zislam@atlassian.com as of now we have not scoped in yet, given this would require architectural change to upgrade to identity v2 api and a workaround exists. As afreedman suggested moving this to long term backlog as of now