Summary

      Enabling and installing JIRA Agile; or updating JIRA Agile in a certain way is causing it to fail.

      Steps to Reproduce

      Install JIRA Agile in the specific order that makes it not work, which is still to be discovered.

      Expected Results

      JIRA Agile enables successfully.

      Actual Results

      The following stack trace is thrown:

      2013-12-08 18:18:36,903 pool-15-thread-1 INFO hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [com.pyxis.greenhopper.jira], 2 seconds remaining
      2013-12-08 18:18:37,903 pool-15-thread-1 INFO hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [com.pyxis.greenhopper.jira], 1 seconds remaining
      2013-12-08 18:18:38,903 pool-15-thread-1 INFO hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [com.pyxis.greenhopper.jira], 0 seconds remaining
      2013-12-08 18:18:39,903 pool-15-thread-1 INFO hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [atlassian.plugin.manager.DefaultPluginManager] Disabling com.pyxis.greenhopper.jira
      2013-12-08 18:18:40,872 pool-15-thread-1 ERROR hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [atlassian.plugin.manager.PluginEnabler] Unable to start the following plugins due to timeout while waiting for plugin to enable: com.pyxis.greenhopper.jira
      2013-12-08 18:18:41,872 ThreadPoolAsyncTaskExecutor::Thread 39 ERROR hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [internal.dependencies.startup.DependencyWaiterApplicationContextExecutor] Unable to create application context for [com.pyxis.greenhopper.jira], unsatisfied dependencies: none
      java.lang.IllegalStateException: Invalid BundleContext.
      	at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:365)
      	at org.apache.felix.framework.BundleContextImpl.getServiceReferences(BundleContextImpl.java:307)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReferences(OsgiServiceReferenceUtils.java:159)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReferences(OsgiServiceReferenceUtils.java:195)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.isServicePresent(OsgiServiceReferenceUtils.java:327)
      	at org.springframework.osgi.extender.internal.dependencies.startup.MandatoryServiceDependency.isServicePresent(MandatoryServiceDependency.java:82)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.doFindDependencies(DependencyServiceManager.java:287)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.access$700(DependencyServiceManager.java:40)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager$1.run(DependencyServiceManager.java:213)
      	at org.springframework.osgi.extender.internal.util.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:124)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.findServiceDependencies(DependencyServiceManager.java:209)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:239)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
      	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
      	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-12-08 18:18:41,872 ThreadPoolAsyncTaskExecutor::Thread 39 ERROR hhunfeld 1095x47194x1 1p0no84 172.20.2.134 /rest/plugins/self-update/1.0/ [extender.internal.activator.ContextLoaderListener] Application context refresh failed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.pyxis.greenhopper.jira, config=osgibundle:/META-INF/spring/*.xml))
      java.lang.IllegalStateException: Invalid BundleContext.
      	at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:365)
      	at org.apache.felix.framework.BundleContextImpl.getServiceReferences(BundleContextImpl.java:307)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReferences(OsgiServiceReferenceUtils.java:159)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.getServiceReferences(OsgiServiceReferenceUtils.java:195)
      	at org.springframework.osgi.util.OsgiServiceReferenceUtils.isServicePresent(OsgiServiceReferenceUtils.java:327)
      	at org.springframework.osgi.extender.internal.dependencies.startup.MandatoryServiceDependency.isServicePresent(MandatoryServiceDependency.java:82)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.doFindDependencies(DependencyServiceManager.java:287)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.access$700(DependencyServiceManager.java:40)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager$1.run(DependencyServiceManager.java:213)
      	at org.springframework.osgi.extender.internal.util.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:124)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.findServiceDependencies(DependencyServiceManager.java:209)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:239)
      	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)
      	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)
      	at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)

      Once JAG is disabled or stalled, all boards are disabled.

      Workaround

      1. Increase the plugin start timeout from default 60 seconds to 300 seconds by specifying the startup parameter -Datlassian.plugins.enable.wait=300. For a better description please see the Workaround on JIRA System Plugin Timeout While Waiting for Plugins to Enable. Note that if you do not specify the increased timeout, you will likely run into the same problem when you try updating the plugin to a newer version in UPM.
      2. Restart JIRA. This should enable back JIRA Agile
      3. If JIRA Agile boards are missing, perform a re-index to bring back all the missing board.

      So far Atlassian still unable to reproduce this behaviour explicitly, this bug ticket is created to keep track how many users are affected and find a common pattern to reproduce the bug.

            [JSWSERVER-10168] JIRA Agile fails to enable due to Invalid BundleContext

            BostjanR added a comment -

            9.1.0... starts after few reboots

            BostjanR added a comment - 9.1.0... starts after few reboots

            Why would I suddenly start getting this error when Jira Agile has been installed automatically for quite some time?

            Nancy Debnam added a comment - Why would I suddenly start getting this error when Jira Agile has been installed automatically for quite some time?

            Steffen Abel added a comment - - edited

            We have the same problem after upgrading from Core and Agile 7.2.x to 7.3.6.

            The workaround from this article worked for me: https://confluence.atlassian.com/jirakb/jira-applications-system-plugin-timeout-while-waiting-for-add-ons-to-enable-212173447.html 

            It is possible to increase the plugin timeout period by adding the -Datlassian.plugins.enable.wait=300 argument to the JIRA application startup arguments, as in Setting Properties and Options on Startup.

            Steffen Abel added a comment - - edited We have the same problem after upgrading from Core and Agile 7.2.x to 7.3.6. The workaround from this article worked for me: https://confluence.atlassian.com/jirakb/jira-applications-system-plugin-timeout-while-waiting-for-add-ons-to-enable-212173447.html   It is possible to increase the plugin timeout period by adding the -Datlassian.plugins.enable.wait=300 argument to the JIRA application startup arguments, as in Setting Properties and Options on Startup .

            Upgraded from JIRA Core 7.3.1 to 7.3.5 and suddenly have this happening. Not sure whether this has the same cause as in the other cases as we're talking about very different versions.

            I can provide the log upon request.

            Christoph Wysseier added a comment - Upgraded from JIRA Core 7.3.1 to 7.3.5 and suddenly have this happening. Not sure whether this has the same cause as in the other cases as we're talking about very different versions. I can provide the log upon request.

            Miles Duke added a comment - - edited

            We have this symptom after importing the data as part of a rehost of JIRA 6.4.13 from RHEL5/mysql to WS2016/postgresql.  After importing the data, JIRA Agile seems to start in the log files, but the web interface reports that JIRA Agile is not running.

            The log file scanner did take us to this page as a result of these messages in our log:

            2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'greenhopper-launcher': org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.sal.api.scheduling.PluginScheduler)] unavailable
            2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'licenseEventListener': java.lang.IllegalStateException: Invalid BundleContext.
            2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'lexoRankBalancingService': java.lang.IllegalStateException: Invalid BundleContext.

            I'm not certain we are actually experiencing the problem originally described.  We made more than a few mistakes in our first effort at this rehost.  However, I provided this data point, in case it helps.  In my time, I've chased "hard-to-reproduce" scenarios before, and real data can be helpful.

            Miles Duke added a comment - - edited We have this symptom after importing the data as part of a rehost of JIRA 6.4.13 from RHEL5/mysql to WS2016/postgresql.  After importing the data, JIRA Agile seems to start in the log files, but the web interface reports that JIRA Agile is not running. The log file scanner did take us to this page as a result of these messages in our log: 2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'greenhopper-launcher': org.springframework.osgi.service.ServiceUnavailableException: service matching filter=[(objectClass=com.atlassian.sal.api.scheduling.PluginScheduler)] unavailable 2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'licenseEventListener': java.lang.IllegalStateException: Invalid BundleContext. 2017-02-28 15:27:09,411 Timer-1 WARN      [springframework.context.annotation.CommonAnnotationBeanPostProcessor] Invocation of destroy method failed on bean with name 'lexoRankBalancingService': java.lang.IllegalStateException: Invalid BundleContext. I'm not certain we are actually experiencing the problem originally described.  We made more than a few mistakes in our first effort at this rehost.  However, I provided this data point, in case it helps.  In my time, I've chased "hard-to-reproduce" scenarios before, and real data can be helpful.

            A major upgrade of UPM independent of a JIRA upgrade was the cause for us, like with Marc in Nov 2015.

            We were on 4, and have since upgraded to 7.

            Naehas Ops added a comment - A major upgrade of UPM independent of a JIRA upgrade was the cause for us, like with Marc in Nov 2015. We were on 4, and have since upgraded to 7.

            Ignat (Inactive) added a comment - - edited

            Hi everyone,

            This issue has been open for 3 years. The steps to reproduce has not yet been improved since then. If they are known to anyone who watches the issue, please let us know.

            Before that we are not able to start fixing this. I'll be keeping this open in the current state with a hope to get clarification here. I'll revisit the issue in some time to see if problem still exists.

            Thanks!

            –
            Cheers,
            Ignat
            JIRA Bugmaster.

            Ignat (Inactive) added a comment - - edited Hi everyone, This issue has been open for 3 years. The steps to reproduce has not yet been improved since then. If they are known to anyone who watches the issue, please let us know. Before that we are not able to start fixing this. I'll be keeping this open in the current state with a hope to get clarification here. I'll revisit the issue in some time to see if problem still exists. Thanks! – Cheers, Ignat JIRA Bugmaster.

            Our symptoms: Jira Agile disabled itself when the UPM was upgraded from 2.20.7 to 2.21 UPM.
            Tried restarting JIRA with no changes ... no luck, JIRA Agile plug-in did not restart.
            Restarted JIRA with the "-Datlassian.plugins.enable.wait=300" argument added to setenv.sh file and the JIRA Agile plug-in successfully started.
            Jira: 6.4.5
            UPM: 2.20.7 > 2.21
            Agile: 6.7.14

            Charles Licata added a comment - Our symptoms: Jira Agile disabled itself when the UPM was upgraded from 2.20.7 to 2.21 UPM. Tried restarting JIRA with no changes ... no luck, JIRA Agile plug-in did not restart. Restarted JIRA with the "-Datlassian.plugins.enable.wait=300" argument added to setenv.sh file and the JIRA Agile plug-in successfully started. Jira: 6.4.5 UPM: 2.20.7 > 2.21 Agile: 6.7.14

            You are wrong

            Daniel Nuñez added a comment - You are wrong

            Dan Hoyer added a comment -

            As a follow-up to my previous comment, the workaround listed works perfectly in my environment. It seems the plug in needed approx 100 seconds to enable, but works as before once given enough time to enable.

            Dan Hoyer added a comment - As a follow-up to my previous comment, the workaround listed works perfectly in my environment. It seems the plug in needed approx 100 seconds to enable, but works as before once given enough time to enable.

              Unassigned Unassigned
              vkharisma vkharisma
              Affected customers:
              74 This affects my team
              Watchers:
              79 Start watching this issue

                Created:
                Updated: