Confluence setup, error during sync to JIRA for user management
Asked by Abhijeet Shinde:

**This is for On-Premise (self hosted).**

Confluence 5.3.4 and JIRA 6.1.

Am configuring the Confluence during the initial setup to use JIRA for user management and its throwing the following error in the logs.

On the setup UI "Full synchronisation completed successfully." message is shown, but the Next button is disbaled.

2013-11-26 03:52:58,336 INFO \[Long running task: Synchronising JIRA Directory\] \[atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations\] addOrUpdateCachedGroups scanning \[ 15 \] groups to add or update

2013-11-26 03:52:58,340 INFO \[Long running task: Synchronising JIRA Directory\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] findGroupsToUpdate scanned and compared \[ 15 \] groups for update in DB cache in \[ 3ms \]

2013-11-26 03:52:58,345 INFO \[Long running task: Synchronising JIRA Directory\] \[atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations\] addOrUpdateCachedGroups synchronized \[ 15 \] groups in \[ 9ms \]

2013-11-26 03:52:58,349 INFO \[Long running task: Synchronising JIRA Directory\] \[atlassian.crowd.directory.DbCachingRemoteChangeOperations\] deleteCachedGroupsNotIn scanned and compared \[ 15 \] groups for delete in DB cache in \[ 3ms \]

2013-11-26 03:52:58,469 INFO \[Long running task: Synchronising JIRA Directory\] \[atlassian.crowd.directory.DbCachingRemoteDirectory\] synchroniseCache FULL synchronisation complete for directory \[ 131073 \] in \[ 209ms \]

2013-11-26 03:52:58,480 ERROR \[Long running task: Synchronising JIRA Directory\] \[confluence.setup.actions.ConnectToJiraSyncDirectoryAction$SyncJiraDirectoryLongRunningTask\] runInternal User externalId cannot be changed

-- url: /setup/connecttojirasyncdirectory-start.action \| userName: anonymous \| action: connecttojirasyncdirectory-start

com.atlassian.crowd.exception.InvalidUserException: User externalId cannot be changed

at com.atlassian.crowd.directory.InternalDirectory.updateUser(InternalDirectory.java:278)

at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.updateUser(DirectoryManagerGeneric.java:372)

at com.atlassian.confluence.setup.actions.ConnectToJiraSyncDirectoryAction$SyncJiraDirectoryLongRunningTask.runInternal(ConnectToJiraSyncDirectoryAction.java:232)

at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)

at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

2013-11-26 03:52:58,481 ERROR \[Long running task: Synchronising JIRA Directory\] \[confluence.util.longrunning.ConfluenceAbstractLongRunningTask\] run Long running task "Synchronising JIRA Directory" failed to run.

-- url: /setup/connecttojirasyncdirectory-start.action \| userName: anonymous \| action: connecttojirasyncdirectory-start

java.lang.RuntimeException: com.atlassian.crowd.exception.InvalidUserException: User externalId cannot be changed

at com.atlassian.confluence.setup.actions.ConnectToJiraSyncDirectoryAction$SyncJiraDirectoryLongRunningTask.runInternal(ConnectToJiraSyncDirectoryAction.java:251)

at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26)

at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:35)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: com.atlassian.crowd.exception.InvalidUserException: User externalId cannot be changed

at com.atlassian.crowd.directory.InternalDirectory.updateUser(InternalDirectory.java:278)

at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.updateUser(DirectoryManagerGeneric.java:372)

at com.atlassian.confluence.setup.actions.ConnectToJiraSyncDirectoryAction$SyncJiraDirectoryLongRunningTask.runInternal(ConnectToJiraSyncDirectoryAction.java:232)

... 8 more


Answers:
author: Gilberto Vento
body: Just for the record, I used firebug to enable Next button and it work.


author: Teck-En
body: There's a bug that the Next button will be disabled after configured the user management to JIRA. It can be resolved by modifying the HTML in tha page as pointed in the workaround section: [](https://jira.atlassian.com/browse/CONF-23184)<https://jira.atlassian.com/browse/CONF-23184>


author: Abhijeet Shinde
body: Have opened a Support issue for this. It seems to be a probable bug; integrating JIRA with Confluence during setup.

Workaround:

1. Do the Confluence setup without configuring User Management to JIRA.

2. Log in to JIRA as a user with JIRA Administrators global permission:

Add the application in JIRA:

1. Log in to JIRA as a user with the**'JIRA Administrators'** [global permission](https://confluence.atlassian.com/display/JIRA044/Managing+Global+Permissions).
2. Select**'Administration' \> 'Users' \> 'JIRA User Server'** .  
   ![(tick)](https://confluence.atlassian.com/s/en_GB-1988229788/4532/e44e912a19b4356578af38c61df778d5fda2d014.27/_/images/icons/emoticons/check.png)[Keyboard shortcut](https://confluence.atlassian.com/display/JIRA044/Using+Keyboard+Shortcuts):**'g' + 'g' +** start typing**'jira user'**.

If you have migrated JIRA from On-Demand, you may not see the **'JIRA User Server'** link**.**

**Go to link:** http://localhost:8080/secure/admin/ConfigureCrowdServer.jspa

And configure the application name and password.

Do the rest of setup as described in document: <https://confluence.atlassian.com/display/JIRA044/Allowing+Other+Applications+to+Connect+to+JIRA+for+User+Management>

Thanks,

Abhijeet  


author: Tiago Comasseto
body: Hi there, I found this [bug report](https://jira.atlassian.com/browse/CWD-3577) that has the same error message (*User externalId cannot be changed* ). Are you using the [Delegated LDAP directory](https://confluence.atlassian.com/display/JIRA/Connecting+to+an+Internal+Directory+with+LDAP+Authentication) in your JIRA instance? In case yes, please consider unmarking the option [Copy user on first login](https://confluence.atlassian.com/display/JIRA/Connecting+to+an+Internal+Directory+with+LDAP+Authentication#ConnectingtoanInternalDirectorywithLDAPAuthentication-CopyingUsersonFirstLogin) and check whether it brings any improvement to this case.

Cheers

comments: author: Abhijeet Shinde
body: We are using the JIRA Internal Directory.

Thanks.


Tags: confluence-administration