[BuildNumberInHomeMatchesDatabase] Bamboo home directory comes from version 6.2 or older (build numb
Asked by Davor Ceman:

Hello,

I'm trying for the first time to install bamboo. I followed instructions from here

<https://confluence.atlassian.com/bamboo/installing-bamboo-on-linux-289276792.html>

I downloaded package atlassian-bamboo-6.9.2.tar.gz so it is not any upgrading from previous version, and other solutions from this forums are not helping me.

So at the final step, I chose embedded database, create user and wait installation to be finalized. I checked catalina.out and last line was not changed 5 minutes
> 2019-07-16 13:01:29,048 INFO \[http-nio-8085-exec-6\] \[AccessLogFilter\] ceman POST <http://3.121.236.241:8085/setup/finishsetup.action> 283816kb

Website did not responded so I decided to restart server. After execution of ./stop-bamboo.sh I got this error
> java.net.ConnectException: Connection refused (Connection refused)

<br />

I started bamboo again and in browser I got some bootstrap error that database and home directory are not the same. At the beginning before I started server, I created /var/bamboo/bamboo-home like example from instructon link.

This is error from atlassian-bamboo.log.

> 2019-07-16 13:36:02,847 FATAL \[localhost-startStop-1\] \[BuildNumberInHomeMatchesDatabase\] Bamboo home directory comes from version 6.2 or older (build number \[60911\]) but database does not contain build number  
> 2019-07-16 13:36:02,918 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:59)  
> at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTask(BootstrapUpgradeManagerImpl.java:134)  
> at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.lambda$runValidationTasks$0(BootstrapUpgradeManagerImpl.java:93)  
> at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.forEachTask(AbstractUpgradeManager.java:150)  
> at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTasks(BootstrapUpgradeManagerImpl.java:93)  
> at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:373)  
> at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:277)  
> at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:81)  
> at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:118)  
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4770)  
> at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)  
> at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)  
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)  
> at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)  
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
> at java.lang.Thread.run(Thread.java:748)  
> 2019-07-16 13:36:02,920 FATAL \[localhost-startStop-1\] \[DefaultBootstrapManager\] Validation tests failed: Your Bamboo instance could not start because Bamboo home directory does not match database. Contact Atlassian Support at <https://support.atlassian.com>

What I'm doing wrong?


Answers:
author: Davor Ceman
body: Hm...

I tried to see what build number is in database and I got:
> sql\> select \* from bamboo.bandana where bandana_key = 'bamboo.db.version';  
> Error: org.h2.jdbc.JdbcSQLException: Schema "BAMBOO" not found; SQL statement:

I logged in with command
> java -cp h2-1.4.196.jar org.h2.tools.Shell

and URL is jdbc:h2:file:/var/bamboo/bamboo-home/database/h2

It seems like database is not created?

> sql\> show databases;  
> SCHEMA_NAME  
> INFORMATION_SCHEMA  
> PUBLIC

It is strange because i checked log and I see that tables are created and the last line is
> 2019-07-16 12:56:08,325 INFO \[setupEmbeddedDatabaseBackgroundThread\] \[DefaultHibernateConfigurator\] Bamboo schema created.