Bamboo startup pauses with no meaningful log entries and ActiveMQ continuously restarts

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 は除く

問題

Bamboo Server startup (or installing / starting a remote agent) pauses with no meaningful log entries after the pre-bootstrap upgrade tasks complete successfully. When visiting the Bamboo URL in the browser, a blank white screen is displayed. The last log entries displayed in <bamboo-install>/logs/catalina.out show some entries from Quartz scheduler:

2016-08-01 23:21:00,440 INFO [localhost-startStop-1] [StdSchedulerFactory] Quartz scheduler 'scheduler' initialized from an externally provided properties instance.
2016-08-01 23:21:00,440 INFO [localhost-startStop-1] [StdSchedulerFactory] Quartz scheduler version: 1.8.6
2016-08-01 23:21:00,441 INFO [localhost-startStop-1] [QuartzScheduler] JobFactory set to: com.atlassian.bamboo.quartz.AutowiringJobFactory@293ad6c3

If the application is left up and running long enough you might eventually see ActiveMQ will restart on roughly a 15 minute interval:

2016-08-01 23:37:10,159 INFO [localhost-startStop-1] [BrokerService] Apache ActiveMQ 5.13.0 (bamboo, ID:bamboo-53051-1470057654787-0:1) is shutting down
2016-08-01 23:37:10,223 INFO [localhost-startStop-1] [BrokerPluginSupport] Broker Plugin com.atlassian.bamboo.amq.DisableClientSideExpiryBrokerPlugin stopped
2016-08-01 23:37:10,223 INFO [localhost-startStop-1] [KahaDBStore] Stopping async queue tasks
2016-08-01 23:37:10,223 INFO [localhost-startStop-1] [KahaDBStore] Stopping async topic tasks
2016-08-01 23:37:10,225 INFO [localhost-startStop-1] [KahaDBStore] Stopped KahaDB
2016-08-01 23:37:10,619 INFO [localhost-startStop-1] [BrokerService] Apache ActiveMQ 5.13.0 (bamboo, ID:bamboo-53051-1470057654787-0:1) uptime 16 minutes
2016-08-01 23:37:10,619 INFO [localhost-startStop-1] [BrokerService] Apache ActiveMQ 5.13.0 (bamboo, ID:bamboo-53051-1470057654787-0:1) is shutdown
2016-08-01 23:37:11,061 INFO [localhost-startStop-1] [BrokerService] Using Persistence Adapter: KahaDBPersistenceAdapter[/var/bamboo-home]
2016-08-01 23:37:11,451 INFO [localhost-startStop-1] [MessageDatabase] Persistence store purged.
2016-08-01 23:37:11,474 INFO [localhost-startStop-1] [BrokerService] Apache ActiveMQ 5.13.0 (bamboo, ID:bamboo-53051-1470057654787-0:2) is starting

診断

Bamboo is currently attempting to autowire springbeans. Enable DEBUG level logging for the org.springframework.beans.factory.support package by adding this to the <bamboo-install>/atlassian-bamboo/WEB-INF/classes/log4j.properties file and observe the <bamboo-install>/logs/catalina.out to capture the nested exceptions at the root of the problem:

log4j.logger.org.springframework.beans.factory.support=DEBUG

Remember to remove this line from your log4j.properties file once the issue is resolved as this is a rather chatty class to have logging DEBUG and will quickly bloat your log files.

Please see the following Bamboo documentation for more information on adjusting the logging level in Bamboo. The documentation will assist you in carrying out the same changes for the remote agent however this will likely not be necessary as the remote agent has in the past logged these exceptions at WARN level which is logged by default.

原因

Cause 1 - Outdated Artifactory Plugin:

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.plugin.osgi.container.felix.FelixOsgiContainerManager]: Constructor threw exception; nested exception is com.google.common.util.concurrent.ExecutionError: java.lang.NoSuchMethodError: com.google.common.base.Equivalence.identity()Lcom/google/common/base/Equivalence;

At the time of writing this has been the observed behavior when running an outdated and incompatible version of Artifactory for Bamboo when trying to start Bamboo Server 5.12.x but this may manifest on other version combinations. 

As a troubleshooting step consider temporarily removing bamboo-artifactory-plugin-x.x.x.jar from <bamboo-install>/atlassian-bamboo/WEB-INF/lib to confirm this as the root-cause.

If you are observing this same behavior without the Artifactory plugin, please investigate the possibility that this might be caused by a different incompatible third-party version 1 plugin installed in <bamboo-install>/atlassian-bamboo/WEB-INF/lib.

Cause 2 - Unable to clean the cache:

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.plugin.osgi.container.impl.DefaultOsgiPersistentCache]: Constructor threw exception; nested exception is com.atlassian.plugin.osgi.container.OsgiContainerException: Unable to clean the cache directory: /var/bamboo-home/caches/plugins/felix

Plugin JARs need to be recompiled (possibly due to a change in JDK / JRE) but for whatever reason Bamboo or your remote agent couldn't clean the directory to do the recompile. 

This particular case will be handled and reported better in Bamboo 5.14 as a result of   BAM-17866 - Getting issue details... STATUS

Cause 3 - Incorrect crowd.properties configuration:

org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.crowd.integration.atlassianuser.CrowdAuthenticator]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: org.apache.commons.httpclient.URIException: URI-Reference required

Incorrect configuration in <bamboo-home>/xml-data/configuration/crowd.properties when crowd or JIRA are selected for user management in your <bamboo-home>/xml-data/configuration/atlassian-user.xml e.g.

atlassian-user.xml
<atlassian-user>
    <repositories>
        <crowd name='Crowd Repository' key='crowd'/>
    </repositories>
</atlassian-user>

Cause 4 - Missing atlassian-user.xml:

[com.atlassian.crowd.integration.atlassianuser.UserConfigurationPersisterImpl]: Constructor threw exception; nested exception is java.io.FileNotFoundException: File '<bamboo-home>\xml-data\configuration\atlassian-user.xml' does not exist

ソリューション

Cause 1 - Outdated Artifactory Plugin:

  • If you wish to remove the plugin completely instead: Remove bamboo-artifactory-plugin-x.x.x.jar from <bamboo-install>/atlassian-bamboo/WEB-INF/lib

Cause 2 - Unable to clean the cache:

  1. Shutdown Bamboo
  2. Verify that the user running Bamboo / Agent full ownership of the <bamboo-home> / <bamboo-agent-home> directory and it's contents:
    • For Linux: chown -R <bamboouser>: <bamboo-home-location>
    • For Windows: Right click on <bamboo-home> and hit Properties. Navigate to the Security Tab and make sure that the user running Bamboo has Full Control of this folder. Then startup again.
  3. Start Bamboo

Alternatively you could clean this directory manually e.g. rm -r /var/bamboo-home/caches/ Next time Bamboo starts, it will recreate the directory with the correct permissions for the user running Bamboo. However it's likely you could have permission issues on other important directories.

Cause 3 - Incorrect crowd.properties configuration:

  1. <bamboo-home>/xml-data/configuration/crowd.properties を編集します。
  2. Ensure the following lines are NOT commented out (e.g. have a # in front):

    crowd.server.url=http\://localhost\:8095/crowd/services/
    crowd.base.url=http\://localhost:8085/jira

Alternatively, if you're looking to restore Bamboo back to local user management, revert your <bamboo-home>/xml-data/configuration/atlassian-user.xml back to:

atlassian-user.xml
<atlassian-user>
    <repositories>
        <hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/>
    </repositories>
</atlassian-user>

Cause 4 - Missing atlassian-user.xml:

  1. Shutdown Bamboo
  2. Restore atlassian-user.xml from backup to <bamboo-home>/xml-data/configuration
    • If you don't have a backup of the file, re-create the file with the following contents:

      <atlassian-user>
          <repositories>
              <hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" cache="true"/>
          </repositories>
      </atlassian-user>
    • The above example will revert Bamboo back to local user management, if you were using Crowd or LDAP you will need to reconfigure this accordingly.

    • If you cannot regain access to Bamboo after reverting back to local user management, e.g. if you don't remember the local admin account password – please see the following documentation to reset the password for administrator accounts:
  3. Start Bamboo

 

最終更新日 2018 年 11 月 2 日

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

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