Your Bamboo instance could not start because Bamboo home directory does not match database.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

*Except Fisheye and Crucible

    

Summary

When starting Bamboo you receive the error Bamboo bootstrap failed: Your Bamboo instance could not start because Bamboo home directory does not match database. in the UI and logs at $BAMBOO_HOME/logs/atlassian-bamboo.log

Diagnosis

Check the $BAMBOO_HOME/logs/atlassian-bamboo.log for more information about the version mismatch. Example:

2021-06-03 18:33:38,239 INFO [localhost-startStop-1] [BootstrapUpgradeManagerImpl] ---------------------------------------------------------------------------
2021-06-03 18:33:38,239 INFO [localhost-startStop-1] [BootstrapUpgradeManagerImpl] 3 : Validate if build number in home directory matches database (bootstrap)
2021-06-03 18:33:38,239 INFO [localhost-startStop-1] [BootstrapUpgradeManagerImpl] ---------------------------------------------------------------------------
2021-06-03 18:33:38,487 INFO [MLog-Init-Reporter] [MLog] MLog clients using slf4j logging.
2021-06-03 18:33:38,583 INFO [localhost-startStop-1] [C3P0Registry] Initializing c3p0-0.9.5.2 [built 08-December-2015 22:06:04 -0800; debug? true; trace: 10]
2021-06-03 18:33:38,668 INFO [localhost-startStop-1] [AbstractPoolBackedDataSource] Initializing c3p0 pool... c...
2021-06-03 18:33:38,818 FATAL [localhost-startStop-1] [BuildNumberInHomeMatchesDatabase] Bamboo home directory build number [60509] does not match build number from database [60405]
2021-06-03 18:33:38,841 FATAL [localhost-startStop-1] [BootstrapUpgradeManagerImpl] Task 3 failed
com.atlassian.bamboo.upgrade.exception.ValidationException: Your Bamboo instance could not start because Bamboo home directory does not match database. Contact Atlassian Support at https://support.atlassian.com
at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInHomeMatchesDatabase.doUpgrade(BuildNumberInHomeMatchesDatabase.java:55)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:132)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:92)

Or:

[BuildNumberInHomeMatchesDatabase] Bamboo home directory build number [60509] does not match build number from database [60405]
  com.atlassian.bamboo.upgrade.exception.ValidationException: Your Bamboo instance could not start because Bamboo home directory doesn't match database. Contact Atlassian Support at https://support.atlassian.com
  at com.atlassian.bamboo.upgrade.tasks.validation.BuildNumberInHomeMatchesDatabase.doUpgrade(BuildNumberInHomeMatchesDatabase.java:55)
  at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:134)

This suggests that your $BAMBOO_HOME directory is versioned at 60509 but the database is version 60405. Meaning that the home directory is from a newer Bamboo version than the database. 

Cause

Both the filesystem for $BAMBOO_HOME and the database are versioned as their schema/structure can be altered over time and need to match.

The issue is caused by a mismatch of version between the $BAMBOO_HOME directory (version is stored within $BAMBOO_HOME/bamboo.cfg.xml) and the Bamboo database.

The above example suggests that the $BAMBOO_HOME directory is versioned at 60509 but the database is version 60405. Meaning that the home directory is a newer version than the database.  This was caused in an upgrade testing scenario where the database was rolled back but the $BAMBOO_HOME filesystem was not restored to a snapshot/backup that was taken when the database snapshot was taken.

Solution

The recommended solution in the event of a mismatch which is caused by a rollback scenario is always to restore the filesystem to a backup that was taken at the time of the database and matches. 

The below is not a recommended solution without reaching out to Atlassian Support for guidance first. We can help advise you if there are potential incompatibilities made by upgrade tasks depending on the versions.

If a suitable backup of the filesystem does not exist, it is possible to edit the $BAMBOO_HOME/bamboo.cfg.xml to adjust the buildNumber property to match the database version as a last resort.

This is not recommended as a first step as there may be incompatible changes in the filesystem structure caused by the upgrade tasks run from a different version of Bamboo. It is recommended in the event of this to reach out to Atlassian Support at https://support.atlassian.com and include the following:

  • $BAMBOO_HOME/logs/atlassian-bamboo.log*
  • $BAMBOO_HOME/bamboo.cfg.xml


It is never recommended to modify the version in the database and so this knowledge-base article will not go into detail about where this is stored. The database is the source of truth and this version should never be changed as the risk of instability as the result of doing this is very high.

Last modified on Jul 28, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.