Plugins initialization times out with Timeout occurred before finding service dependencies on Bamboo startup

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

After migrating or starting Bamboo we might see the following warnings and errors stating "Timeout exceeded waiting for service com.atlassian.soy.renderer.SoyTemplateRenderer" or "Timeout occurred before finding service dependencies" in the $BAMBOO_HOME/atlassian-bamboo.log file:

During the Bamboo startup, we can see at the atlassian-bamboo.log file errors indicating that some required plugins are failing to start.

com.atlassian.bamboo.plugin.osgi.OsgiServiceProxyFactoryImpl$ServiceTimeoutExceeded: Timeout exceeded waiting for service - com.atlassian.soy.renderer.SoyTemplateRenderer at com.atlassian.bamboo.plugin.osgi.OsgiServiceProxyFactoryImpl.lambda$serviceAccessor$0(OsgiServiceProxyFactoryImpl.java:118) at com.atlassian.bamboo.plugin.osgi.InvocationHandlers$SameClassLoaderInvocationHandler.invokeServiceMethod(InvocationHandlers.java:106) at com.atlassian.bamboo.plugin.osgi.InvocationHandlers$DynamicServiceInvocationHandler.invoke(InvocationHandlers.java:54) at com.sun.proxy.$Proxy507.render(Unknown Source) 
[…]
at freemarker.core.Environment.process(Environment.java:305) at freemarker.template.Template.process(Template.java:384) at com.atlassian.bamboo.ww2.FreemarkerRequestDispatcherPageFilter.applyDecorator(FreemarkerRequestDispatcherPageFilter.java:134) at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) at com.atlassian.bamboo.ww2.FreemarkerRequestDispatcherPageFilter.access$200(FreemarkerRequestDispatcherPageFilter.java:46) at com.atlassian.bamboo.ww2.FreemarkerRequestDispatcherPageFilter$BambooSitemeshDecorator.render(FreemarkerRequestDispatcherPageFilter.java:275) at 
...
ERROR [ThreadPoolAsyncTaskExecutor::Thread 18] [OsgiPlugin] Unable to start the plugin container for plugin 'com.atlassian.bamboo.brokenbuildtracker'
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [bundle://29.0:0/META-INF/spring/spring-scanner.xml]; nested exception is java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.bamboo.plugins.brokenbuildtracker.atlassian-bamboo-plugin-brokenbuildtracker'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has <scope>provided</scope>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414) 
[…]
Caused by: java.lang.IllegalStateException: Cannot execute atlassian-spring-scanner-runtime: plugin has an extra copy of atlassian-spring-scanner-annotation classes, perhaps embedded inside the target plugin 'com.atlassian.bamboo.plugins.brokenbuildtracker.atlassian-bamboo-plugin-brokenbuildtracker'; embedding scanner-annotations is not supported since scanner version 2.0. Use 'mvn dependency:tree' and ensure the atlassian-spring-scanner-annotation dependency in your plugin has <scope>provided</scope>, not 'runtime' or 'compile', and you have NO dependency on atlassian-spring-scanner-runtime.
at com.atlassian.plugin.spring.scanner.runtime.impl.AtlassianScannerBeanDefinitionParser.checkScannerRuntimeIsNotEmbeddedInBundle(AtlassianScannerBeanDefinitionParser.java:198)
at com.atlassian.plugin.spring.scanner.runtime.impl.AtlassianScannerBeanDefinitionParser.parse(AtlassianScannerBeanDefinitionParser.java:60)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411)
... 20 more
INFO [main] [BambooPluginManager] Adding resource bundle: com.atlassian.bamboo.webrepository.stash.i18n
ERROR [main] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.atlassian.activeobjects.bamboo.spi' : Unresolved constraint in bundle com.atlassian.activeobjects.bamboo.spi [21]: Unable to resolve 21.0: missing requirement [21.0] package; (&(package=javax.sql)(version>=0.0.0.1_006_JavaSE)(version<=0.0.0.1_006_JavaSE)).  This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see http://confluence.atlassian.com/x/1xy6D
2012-09-28 11:36:57,637 WARN [main] [OsgiPlugin] Unable to enable plugin 'com.atlassian.activeobjects.bamboo.spi'
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.atlassian.activeobjects.bamboo.spi
        at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:445)
        at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:237)
        at com.atlassian.plugin.impl.AbstractDelegatingPlugin.enable(AbstractDelegatingPlugin.java:215)
[…]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.atlassian.activeobjects.bamboo.spi [21]: Unable to resolve 21.0: missing requirement [21.0] package; (&(package=javax.sql)(version>=0.0.0.1_006_JavaSE)(version<=0.0.0.1_006_JavaSE))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
        at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:417)
        ... 21 more
2012-09-28 11:36:57,638 ERROR [main] [PluginEnabler] Unable to enable plugin com.atlassian.activeobjects.bamboo.spi
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.atlassian.activeobjects.bamboo.spi
        at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:445)
        at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:237)
[…]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.atlassian.activeobjects.bamboo.spi [21]: Unable to resolve 21.0: missing requirement [21.0] package; (&(package=javax.sql)(version>=0.0.0.1_006_JavaSE)(version<=0.0.0.1_006_JavaSE))
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
[…]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.atlassian.upm.atlassian-universal-plugin-manager-plugin [49]: Unable to resolve 49.0: missing requirement [49.0] package; (&(package=com.atlassian.plugins.rest.common)(version>=1.0.5)) [caused by: Unable to resolve 39.0: missing requirement [39.0] package; (&(package=javax.activation)(version>=0.0.0.1_006_JavaSE)(version<=0.0.0.1_006_JavaSE))]
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
        at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:417)
        ... 21 more
2012-09-28 11:37:58,687 WARN [Timer-2] [DependencyWaiterApplicationContextExecutor] Timeout occurred before finding service dependencies for [NonValidatingOsgiBundleXmlApplicationContext(bundle=com.atlassian.activeobjects.activeobjects-plugin, config=osgibundle:/META-INF/spring/*.xml)]
2012-09-28 11:37:58,690 ERROR [Timer-2] [DependencyWaiterApplicationContextExecutor] Unable to create application context for [com.atlassian.activeobjects.activeobjects-plugin], unsatisfied dependencies: Dependency on [(objectClass=com.atlassian.activeobjects.spi.DataSourceProvider)] (from bean [&dataSourceProvider])
org.springframework.context.ApplicationContextException: Application context initialization for 'com.atlassian.activeobjects.activeobjects-plugin' has timed out
        at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.timeout(DependencyWaiterApplicationContextExecutor.java:454)

You may also see errors like the following display at the top of the Bamboo UI:

com.atlassian.soy.renderer.SoyException: Unable to compile Soy templates at: com.atlassian.plugins.atlassian-nav-links-plugin:rotp-menu at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:162) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197) ... 190 more

原因

It is very likely that the $BAMBOO_HOME/caches/plugins directory contains references to older plugins that are no longer relevant to the version of Bamboo currently installed or Bamboo caches might have been corrupted during the migration.

ソリューション

  1. Shutdown Bamboo.
  2. Add the JVM parameter:

    setenv.sh
    : ${JVM_SUPPORT_RECOMMENDED_ARGS:="-Datlassian.plugins.enable.wait=300"}
    1. In the installation folder of Bamboo edit either bin/setenv.bat (non Windows Service) or bin/setenv.sh file in a text editor.

      または

    2. Edit Window Service Java Options. See Configuring your system properties for steps on how to configure additional arguments for Bamboo running as a Windows service.

  3. Clean the cache by removing the files inside the directories below:

    $BAMBOO_HOME/caches/
    $BAMBOO_HOME/temp/

     This will remove cache files only. It will not permanently remove any plugins. These directories will be recreated during the next Bamboo startup.

  4. Start Bamboo.


Last modified on Mar 21, 2023

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.