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

Upgrading UPM fails with error on com.atlassian.bitbucket.server.bitbucket-mirroring-upstream

      Summary

      Attempting to upgrade UPM to 2.20.6 or 2.20.7 on Bitbucket Server fails. The following scree is displayed:

      Environment

      • So far identified on BBS 4.4.1 and upgrading 2.20.6+

      Steps to Reproduce

      1. Install BBS 4.4.1
      2. Upgrade UPM

      Expected Results

      Upgrade succeeds.

      Actual Results

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

      2016-03-07 11:43:14,784 ERROR [pool-13-thread-1] admin @DJLY7Cx703x1056x0 9unu3q 0:0:0:0:0:0:0:1 "POST /rest/plugins/self-update/1.0/ HTTP/1.1" c.a.e.i.AsynchronousAbleEventDispatcher There was an exception thrown trying to dispatch event [com.atlassian.plugin.connect.plugin.lifecycle.event.ConnectAddonEnabledEvent@4378902a] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.bitbucket.internal.mirroring.upstream.DefaultMirrorService.onAddonEnabled(com.atlassian.plugin.connect.plugin.lifecycle.event.ConnectAddonEnabledEvent), listener=com.atlassian.bitbucket.internal.mirroring.upstream.DefaultMirrorService@593ec02b}]
      java.lang.RuntimeException: plugin [{com.atlassian.bitbucket.server.bitbucket-mirroring-upstream}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
      Show more
      
      Caused by: java.lang.IllegalStateException: plugin [{com.atlassian.bitbucket.server.bitbucket-mirroring-upstream}] invoking ActiveObjects before <ao> configuration module is enabled or plugin is missing an <ao> configuration module. Note that scanning of entities from the ao.model package is no longer supported.
              at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.delegate(TenantAwareActiveObjects.java:165) ~[na:na]
              at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.find(TenantAwareActiveObjects.java:291) ~[na:na]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at com.atlassian.bitbucket.internal.mirroring.upstream.dao.AoMirrorServerDao.getByAddonKey(AoMirrorServerDao.java:71) ~[na:na]
              at com.atlassian.bitbucket.internal.mirroring.upstream.DefaultMirrorService.lambda$maybeUpdateState$9(DefaultMirrorService.java:286) ~[na:na]
              at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21) [sal-core-3.0.5.jar:na]
              at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:54) [bitbucket-platform-4.5.0-SNAPSHOT.jar:na]
              at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) [atlassian-plugins-core-4.1.1.jar:na]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18) [sal-core-3.0.5.jar:na]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57) [gemini-blueprint-core-2.0.0.BUILD-atlassian-m002.jar:2.0.0.BUILD-atlassian-m002]
              at com.atlassian.bitbucket.internal.mirroring.upstream.DefaultMirrorService.maybeUpdateState(DefaultMirrorService.java:285) ~[na:na]
              at com.atlassian.bitbucket.internal.mirroring.upstream.DefaultMirrorService.onAddonEnabled(DefaultMirrorService.java:171) ~[na:na]
              at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) [atlassian-event-3.0.0.jar:na]
              ... 62 common frames omitted
      Show more
      

      Workaround

      While the error is real it is actually slightly incorrect. The UPM is actually upgraded (mostly correctly). The only thing that you might see is the mirroring plugin being disabled which can be fixed by either restarting or clicking the enable button.

            [BSERV-8510] Upgrading UPM fails with error on com.atlassian.bitbucket.server.bitbucket-mirroring-upstream

            Mitch Saba added a comment -

            Thanks!

            Mitch Saba added a comment - Thanks!

            mitch.saba The issue has been fixed and integrated into the 4.3.x and 4.4.x maintenance branches. We'll be releasing 4.3.3 and 4.4.2 shortly.

            Michael Heemskerk (Inactive) added a comment - mitch.saba The issue has been fixed and integrated into the 4.3.x and 4.4.x maintenance branches. We'll be releasing 4.3.3 and 4.4.2 shortly.

            You're saying the problem is fixed in versions 4.4.2 but the latest BitBucket download is 4.4.1???

            Mitch Saba added a comment - You're saying the problem is fixed in versions 4.4.2 but the latest BitBucket download is 4.4.1???

            For me, that wasn't the case, other 3rd party plugins were failing to load too. I fixed it all as I mentioned previously.

            mark_gillespie added a comment - For me, that wasn't the case, other 3rd party plugins were failing to load too. I fixed it all as I mentioned previously.

            bain added a comment -

            We are looking at getting a fix into the next release of Bitbucket server.

            FYI: While the error is real it is actually slightly incorrect. The UPM is actually upgraded (mostly correctly). The only thing that you might see is the mirroring plugin being disabled which can be fixed by either restarting or clicking the enable button.

            bain added a comment - We are looking at getting a fix into the next release of Bitbucket server. FYI: While the error is real it is actually slightly incorrect. The UPM is actually upgraded (mostly correctly). The only thing that you might see is the mirroring plugin being disabled which can be fixed by either restarting or clicking the enable button.

            Had this problem too. I think I fixed it in the end by following this advice:

            https://confluence.atlassian.com/stashkb/stash-failed-to-start-due-to-required-plugin-failed-to-start-394465959.html

            Shut Stash down.
            Backup and remove the following directories. They will be rebuilt when Stash starts again.
            $STASH_HOME/plugins/.bundled-plugins/
            $STASH_HOME/plugins/.osgi-cache/
            Restart Stash.
            Upon starting up, Stash will re-extract the required plugins from <Stash installation directory>/atlassian-stash/WEB-INF/classes/bundled-plugins.zip and rebuild those plugin directories.

            mark_gillespie added a comment - Had this problem too. I think I fixed it in the end by following this advice: https://confluence.atlassian.com/stashkb/stash-failed-to-start-due-to-required-plugin-failed-to-start-394465959.html Shut Stash down. Backup and remove the following directories. They will be rebuilt when Stash starts again. $STASH_HOME/plugins/.bundled-plugins/ $STASH_HOME/plugins/.osgi-cache/ Restart Stash. Upon starting up, Stash will re-extract the required plugins from <Stash installation directory>/atlassian-stash/WEB-INF/classes/bundled-plugins.zip and rebuild those plugin directories.

              mheemskerk Michael Heemskerk (Inactive)
              tbomfim ThiagoBomfim (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: