Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7195

JIRA 6.4 as a Crowd Server does not work with Stash 3.4.3 or higher

      Summary

      There is a known compatibility issue that prevents the user management synchronisation between JIRA 6.4 and Stash 3.4.3+.

      This will only affect you if you use JIRA to manage your Stash users. The bug in JIRA is being tracked on JRA-42566.

      Steps to Reproduce

      1. Set up Stash 3.4.3+ with JIRA 6.4 configured as its User Management Server. To perform that, please refer to Connecting Stash to JIRA for user management
      2. Perform Synchronisation

      Expected Results

      Synchronisation should work just fine.

      Actual Results

      The below exception is thrown in the atlassian-stash.log file:

      ERROR [clusterScheduler_Worker-4]  c.a.c.d.DbCachingDirectoryPoller Error occurred while refreshing the cache for directory [ 229377 ].
      com.atlassian.crowd.exception.OperationFailedException: Error from Crowd server propagated to here via REST API (check the Crowd server logs for details): Class type for return values ('interface com.atlassian.crowd.model.group.GroupWithAttributes') is not 'String' or 'Group'
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions(RestCrowdClient.java:1501) ~[crowd-integration-client-rest-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchGroupsWithAttributes(RestCrowdClient.java:574) ~[crowd-integration-client-rest-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.RemoteCrowdDirectory.searchGroups(RemoteCrowdDirectory.java:547) ~[crowd-remote-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.findAllRemoteGroups(RemoteDirectoryCacheRefresher.java:80) ~[crowd-ldap-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllGroups(RemoteDirectoryCacheRefresher.java:109) ~[crowd-ldap-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:91) ~[crowd-ldap-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:67) ~[crowd-ldap-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:1122) ~[crowd-core-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:76) ~[crowd-core-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) ~[crowd-core-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobRunner.runJob(DirectoryPollerJobRunner.java:93) [crowd-core-2.8.1-m3.jar:na]
      	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) [atlassian-scheduler-core-1.5.0.jar:na]
      	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) [atlassian-scheduler-core-1.5.0.jar:na]
      	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) [atlassian-scheduler-core-1.5.0.jar:na]
      	at com.atlassian.scheduler.quartz2.Quartz2Job.execute(Quartz2Job.java:32) [atlassian-scheduler-quartz2-1.5.0.jar:na]
      	at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na]
      	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na]
      	... 13 frames trimmed
      Caused by: com.atlassian.crowd.integration.rest.service.CrowdRestException: Class type for return values ('interface com.atlassian.crowd.model.group.GroupWithAttributes') is not 'String' or 'Group'
      	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.throwError(RestExecutor.java:660) ~[crowd-integration-client-rest-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:489) ~[crowd-integration-client-rest-2.8.1-m3.jar:na]
      	at com.atlassian.crowd.integration.rest.service.RestCrowdClient.searchGroupsWithAttributes(RestCrowdClient.java:570) ~[crowd-integration-client-rest-2.8.1-m3.jar:na]
      	... 16 common frames omitted
      

      Solution / Workaround

      This is a bug in JIRA 6.4 and is fixed in JIRA 6.4.1. The preferred solution is to upgrade to JIRA 6.4.1.

      If upgrading JIRA is not possible, Stash 3.7.2 and 3.8.0 (but not 3.9.1+) contain a workaround and may be used with JIRA 6.4 as a Crowd Server.

            [BSERV-7195] JIRA 6.4 as a Crowd Server does not work with Stash 3.4.3 or higher

            crf added a comment -

            Yes, to clarify, this should be considered a bug in JIRA 6.4 that is fixed by JIRA 6.4.1. There is nothing that Stash can do long term to fix the fact that JIRA 6.4 has a bug.

            crf added a comment - Yes, to clarify, this should be considered a bug in JIRA 6.4 that is fixed by JIRA 6.4.1. There is nothing that Stash can do long term to fix the fact that JIRA 6.4 has a bug.

            Brent P added a comment - - edited

            I'm sorry I wasn't clear enough about the solution/workaround. Stash 3.7.2/3.8.0 shipped with a patched version of Crowd containing a workaround for the bug in JIRA 6.4. When JIRA 6.4.1 was released with the real fix, we upgraded to a newer version of Crowd that does not contain the workaround. As a result Stash 3.9.1+ require JIRA 6.4.1+ to work as a Crowd Server.

            Brent P added a comment - - edited I'm sorry I wasn't clear enough about the solution/workaround. Stash 3.7.2/3.8.0 shipped with a patched version of Crowd containing a workaround for the bug in JIRA 6.4. When JIRA 6.4.1 was released with the real fix, we upgraded to a newer version of Crowd that does not contain the workaround. As a result Stash 3.9.1+ require JIRA 6.4.1+ to work as a Crowd Server.

            Brent P added a comment -

            This issue has been fixed in Stash 3.7.2. Alternatively, the issue will be fixed in JIRA 6.4.1.

            There is no need to upgrade both Stash and JIRA - upgrading only one system will fix the issue.

            Brent P added a comment - This issue has been fixed in Stash 3.7.2. Alternatively, the issue will be fixed in JIRA 6.4.1. There is no need to upgrade both Stash and JIRA - upgrading only one system will fix the issue.

            Brent P added a comment -

            klfoong - Good catch. The commit that upgraded to 2.8.1-m3 was merged into the Stash 3.4 branch. According to git tag --contains 0e0968a6, it was first released in 3.4.2 and is contained in all further releases.

            Brent P added a comment - klfoong - Good catch. The commit that upgraded to 2.8.1-m3 was merged into the Stash 3.4 branch . According to git tag --contains 0e0968a6 , it was first released in 3.4.2 and is contained in all further releases.

            Nick added a comment -

            Just a quick update that we are currently working on a fix in JIRA for this issue.
            Progress of this fix can be tracked via https://jira.atlassian.com/browse/JRA-42566 .

            We are also investigating a change in Stash to avoid this issue and will update this issue when we know more.

            Nick added a comment - Just a quick update that we are currently working on a fix in JIRA for this issue. Progress of this fix can be tracked via https://jira.atlassian.com/browse/JRA-42566 . We are also investigating a change in Stash to avoid this issue and will update this issue when we know more.

            crf added a comment - - edited

            JIRA 6.4 is not using 2.8.2-m4; it is on 2.8.1-rc. That doesn't appear to be tagged (naughty!) but 2.8.1 final does not have gcrain's changes to sync GroupWithAttributes, and 2.8.1-m3, which is what Stash is using, does.

            Although the version numbers do not suggest this, the explanation can be found in LEM-611. The short version is that Stash went to 2.8.1-m3 and JIRA went to 2.8.1-rc, which does not include the same changes, so Stash is ahead of JIRA and trying to use functionality that isn't there.

            JIRA 6.4.1 will be on 2.8.2-m4 (It was bumped for JDEV-32135) so that should fix this.

            crf added a comment - - edited JIRA 6.4 is not using 2.8.2-m4 ; it is on 2.8.1-rc . That doesn't appear to be tagged (naughty!) but 2.8.1 final does not have gcrain 's changes to sync GroupWithAttributes , and 2.8.1-m3 , which is what Stash is using, does. Although the version numbers do not suggest this, the explanation can be found in LEM-611 . The short version is that Stash went to 2.8.1-m3 and JIRA went to 2.8.1-rc, which does not include the same changes, so Stash is ahead of JIRA and trying to use functionality that isn't there. JIRA 6.4.1 will be on 2.8.2-m4 (It was bumped for JDEV-32135 ) so that should fix this.

              bplump Brent P
              frank.butzek Frank Butzek
              Affected customers:
              5 This affects my team
              Watchers:
              29 Start watching this issue

                Created:
                Updated:
                Resolved: