Enabling the JIRA Agile plugin gives the error "The call to the JIRA server did not complete within the timeout period. We are unsure of the result of this operation."
症状
This problem may occur after upgrading the JIRA Agile plugin and will prevent it from being enabled.
Enabling the JIRA Agile plugin shows the following error:
The call to the JIRA server did not complete within the timeout period. We are unsure of the result of this operation.
atlassian-jira.log
に次のエラーが返される。
Caused by: java.lang.IllegalStateException: Can only register services while bundle is active or activating.
at org.apache.felix.framework.Felix.registerService(Felix.java:2817)
at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:251)
または
/rest/plugins/1.0/com.pyxis.greenhopper.jira-key [atlassian.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'JIRA Agile Help' of plugin 'com.pyxis.greenhopper.jira'. Disabling.
java.lang.RuntimeException: Unable to enable web fragment
at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133)
at com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor.enabled(DefaultWebItemModuleDescriptor.java:72)
at com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor.enabled(DefaultAbstractWebFragmentModuleDescriptor.java:34)
...
Caused by: java.lang.IllegalStateException: Cannot create object because the plugin container is unavailable for bundle 'com.pyxis.greenhopper.jira'
at com.atlassian.plugin.osgi.factory.OsgiPluginInstalledHelper.getRequiredContainerAccessor(OsgiPluginInstalledHelper.java:219)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:372)
at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:362)
原因
There are two known causes for this issue:
- The inconsistency of OSGI plugin caches triggered from inappropriate shutdown of Tomcat.
- The Tomcat user not have the correct permissions to access the directory.
ソリューション
Option #1
- Jira を停止します
Remove the below directories, that hold plug-in caches:
<JIRA_HOME>/plugins/.osgi-plugins/ <JIRA_HOME>/plugins/.bundled-plugins/
Those directories will be recreated upon JIRA's next startup.
- Ensure that the user which runs JIRA has the correct permissions on these directories (recursively);
- Jira を起動します。
Option #2
If the above solution does not work, then you're probably facing a timeout problem that is impeding JIRA Agile to completely startup with JIRA. To resolve that, you'll have to increase the timeout JIRA imposes in the plugin loading process.
- Jira を停止します
Following these instructions, add the below argument to JIRA's startup parameters:
-Datlassian.plugins.enable.wait=300
- Jira を起動します。
JIRA Agile should now be enabled during startup.