Bamboo Upgrade process failing with LazyReference InitializationException post Database setup stage

お困りですか?

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

コミュニティに質問

プラットフォームについて: 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 Upgrade is failing post DB initialization stage with the below error.

ERROR [https-jsse-nio-8443-exec-4] [runtime] Error executing FreeMarker template
FreeMarker template error
io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException 
at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156)

環境

Issue seen on Bamboo 8.1.3

診断

  • During the Bamboo upgrade process post DB Initialization stage, Bamboo GUI fails to come up and below error message in seen on the screen.


  • Bamboo Logs also confirm that the DB initialization was successful. Below log messages would be displayed.
INFO [performSetupDatabaseConnectionBackgroundThread] [SetupDatabaseConnectionAction] Validating connection to url: 
INFO [performSetupDatabaseConnectionBackgroundThread] [SetupDatabaseConnectionAction] Database configuration is valid.


  • Immediately post the above log messages 500 Exception related error would be present in the logs.
 ERROR  [FiveOhOh] 500 Exception was thrown.
 ERROR  [runtime] Error executing FreeMarker template


原因

Below are the cause for the Issue

  1. Proper permission is not available to Bamboo user to <bamboo-home> and <bamboo-install> folders.
  2. Bamboo is not able to read the bamboo.cfg.xml file (or the file is corrupted).

ソリューション

Solution outlined will cover both the causes explained above.

Solution 1 : To provide proper permission to folders

  • The first step is to make sure proper permission is provided to bamboo folders and files are owned by user which is running Bamboo. Please run the below command

    chown -R <user_name> <bamboo-home>
    chown -R <user_name> <bamboo-install>

      where <user_name> is the user_id you're using to start the service.
     Please include the -R parameter as it is important to make sure the ownership to all files and subfolders will also be adjusted.

Solution 2 : To regenerate bamboo.cfg.xml file.

  • Rename the bamboo.cfg.xml file with the below command

    mv bamboo.cfg.xml bamboo.cfg.xml_bkp

Below steps would be common for both solution 1 and solution 2 defined above. 

  • Restart Bamboo and verify if the bamboo.cfg.xml file was created with the correct permission (bamboo user).
  • Move forward with the installation.


Last modified on Mar 31, 2022

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

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