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

SSO for Atlassian Data Center (embedded plugin) can't be enabled after upgrading to Bitbucket 7.13+

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Highest Highest
    • 7.13.1, 7.15.0, 7.14.1
    • 7.13.0, 7.14.0
    • Crowd

      Issue Summary

      After upgrading Bitbucket Server/DC to version 7.13+ (tested 7.0 -> 7.13 and 7.6 -> 7.13) SSO for Atlassian Data Center gets disabled and can't be enabled.

      Steps to Reproduce

      1. Install Bitbucket 7.6.
      2. Upgrade to Bitbucket 7.13+

      Expected Results

      SSO for Atlassian Data Center is enabled.

      Actual Results

      SSO for Atlassian Data Center is disabled and trying to enable it fails with an error:

      {code:java}
      2021-06-10 15:43:09,975 ERROR [ThreadPoolAsyncTaskExecutor::Thread 22]  c.a.plugin.osgi.factory.OsgiPlugin Unable to start the plugin container for plugin 'com.atlassian.plugins.authentication.atlassian-authentication-plugin'
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ssoConfigServiceImpl': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:799)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
      	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.lang.Thread.run(Thread.java:748)
      	... 11 frames trimmed
      Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:220)
      	... 9 common frames omitted
      2021-06-10 15:43:09,983 INFO  [ThreadPoolAsyncTaskExecutor::Thread 22]  o.s.o.a.NonValidatingOsgiBundleXmlApplicationContext Application Context service already unpublished
      2021-06-10 15:43:09,983 INFO  [ThreadPoolAsyncTaskExecutor::Thread 22]  o.e.g.b.e.i.s.ExtenderConfiguration Application context succesfully closed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.authentication.atlassian-authentication-plugin, config=osgibundle:/META-INF/spring/*.xml))
      2021-06-10 15:43:09,987 INFO  [FelixDispatchQueue]  c.a.p.o.c.f.FelixOsgiContainerManager Stopped bundle com.atlassian.plugins.authentication.atlassian-authentication-plugin (109)
      2021-06-10 15:43:09,990 ERROR [ThreadPoolAsyncTaskExecutor::Thread 22]  o.e.g.b.e.i.s.ExtenderConfiguration Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.plugins.authentication.atlassian-authentication-plugin, config=osgibundle:/META-INF/spring/*.xml))
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ssoConfigServiceImpl': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:799)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
      	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.lang.Thread.run(Thread.java:748)
      	... 11 frames trimmed
      Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:220)
      	... 9 common frames omitted
      2021-06-10 15:43:10,008 ERROR [ThreadPoolAsyncTaskExecutor::Thread 22]  o.e.g.b.e.i.d.s.DependencyWaiterApplicationContextExecutor Unable to create application context for [com.atlassian.plugins.authentication.atlassian-authentication-plugin], unsatisfied dependencies: none
      org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'ssoConfigServiceImpl': Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:799)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:57)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:322)
      	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
      	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:287)
      	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.lang.Thread.run(Thread.java:748)
      	... 11 frames trimmed
      Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.atlassian.plugins.authentication.api.config.IdpConfigService' available: expected single matching bean but found 2: idpConfigServiceImpl,auditingIdpConfigService
      	at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:220)
      	... 9 common frames omitted
      {code}
      

      Removing the plugin from /opt/atlassian/bitbucket/app/WEB-INF/atlassian-bundled-plugins/ solved the issue only temporarily.

      Workaround

      Currently, there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [BSERV-12895] SSO for Atlassian Data Center (embedded plugin) can't be enabled after upgrading to Bitbucket 7.13+

            Ming Zhang added a comment - - edited

            After upgrading the Bitbucket server from v6.10.5 to v7.17.0, I upgraded the "SSO for Atlassian Data Center" from v4.2.4 to v4.2.6.  The plugin failed to start anymore on v4.2.6. 

            After upgrading, the plugin became a system plugin. There is no uninstall button anymore. Reluctant to clean/uninstall the plugin on the server.  Any suggestion? 

             update: after rebooting the Bitbucket instance, the plugin starts successfully. Thanks.

            Ming Zhang added a comment - - edited After upgrading the Bitbucket server from v6.10.5 to v7.17.0, I upgraded the "SSO for Atlassian Data Center" from v4.2.4 to v4.2.6.  The plugin failed to start anymore on v4.2.6.  After upgrading, the plugin became a system plugin. There is no uninstall button anymore. Reluctant to clean/uninstall the plugin on the server.  Any suggestion?   update: after rebooting the Bitbucket instance, the plugin starts successfully. Thanks.

            Sam Power added a comment -

            Hi all,

            As Alex has noted the fix for the SSO app is now available on the marketplace in version 4.2.4. This version will be bumped in versions 7.13.1 and 7.14.1 of Bitbucket as well.

            Thanks,
            Sam Power
            Bitbucket Engineering Manager

            Sam Power added a comment - Hi all, As Alex has noted the fix for the SSO app is now available on the marketplace in version 4.2.4. This version will be bumped in versions 7.13.1 and 7.14.1 of Bitbucket as well. Thanks, Sam Power Bitbucket Engineering Manager

            Alex Bunk added a comment -

            Tried the new SSO app version 4.2.4 on our sandbox system which was experiencing the issue. After manually uploading the jar file the app started up successfully and SSO was working again.  

            https://marketplace.atlassian.com/apps/1216096/sso-for-atlassian-server-and-data-center/version-history

             

            Alex Bunk added a comment - Tried the new SSO app version 4.2.4 on our sandbox system which was experiencing the issue. After manually uploading the jar file the app started up successfully and SSO was working again.   https://marketplace.atlassian.com/apps/1216096/sso-for-atlassian-server-and-data-center/version-history  

            Alex Bunk added a comment -

            Yes, it also affects version 7.14.0. I've stopped the cluster node affected in my case, cleaned up the plugin cache as well as the tmp folder and restarted. So far, so good, but might happen again. @Atlassian, I also created a support ticket and the answer I got was that this is a known bug therefore allow me 2 questions:

            1. What is causing the issue?
            2. When will a fix be available?

            Alex Bunk added a comment - Yes, it also affects version 7.14.0. I've stopped the cluster node affected in my case, cleaned up the plugin cache as well as the tmp folder and restarted. So far, so good, but might happen again. @Atlassian, I also created a support ticket and the answer I got was that this is a known bug therefore allow me 2 questions: What is causing the issue? When will a fix be available?

            Sake added a comment -

            Upgrade from 7.4.1 to 7.13.0 results in the same issue.

            Sake added a comment - Upgrade from 7.4.1 to 7.13.0 results in the same issue.

            Alex Bunk added a comment -

            7.2.4 -> 7.13 runs into the same issue. 

            Alex Bunk added a comment - 7.2.4 -> 7.13 runs into the same issue. 

            7.9 to 7.13 also give this same error.

            Pekao S.A. added a comment - 7.9 to 7.13 also give this same error.

              ckochovski@atlassian.com Christopher Kochovski
              ttokarczuk@atlassian.com Tomasz Tokarczuk (Inactive)
              Affected customers:
              8 This affects my team
              Watchers:
              21 Start watching this issue

                Created:
                Updated:
                Resolved: