Confluence setup, error during sync to JIRA for user management

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

4 answers

Hi there, I found this bug report that has the same error message (User externalId cannot be changed). Are you using the Delegated LDAP directory in your JIRA instance? In case yes, please consider unmarking the option Copy user on first login and check whether it brings any improvement to this case.

Cheers

We are using the JIRA Internal Directory.

Thanks.

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.
  2. Select'Administration' > 'Users' > 'JIRA User Server'.
    (tick)Keyboard shortcut:'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

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

Just for the record, I used firebug to enable Next button and it work.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,989 views 25 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you