After upgrading bamboo form 5.6.1 to 5.14, While starting bamboo getting mysql db issue.
Asked by vijay_kumar:

Logs

2020-05-21 15:38:24,673 INFO \[localhost-startStop-1\] \[BootstrapLoaderListener\] Starting BootstrapLoaderListener  
2020-05-21 15:38:24,673 INFO \[localhost-startStop-1\] \[lifecycle\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2020-05-21 15:38:24,673 INFO \[localhost-startStop-1\] \[lifecycle\] \* Bamboo is starting up \*  
2020-05-21 15:38:24,673 INFO \[localhost-startStop-1\] \[lifecycle\] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2020-05-21 15:38:24,674 INFO \[localhost-startStop-1\] \[ServletContextHolder\] Setting servlet context: Bamboo  
2020-05-21 15:38:24,714 INFO \[localhost-startStop-1\] \[lifecycle\] atlassian.org.osgi.framework.bootdelegation set to javax.servlet,javax.servlet.\*,sun.\*,com.sun.\*,org.w3c.dom.\*,org.apache.xerces.\*  
2020-05-21 15:38:24,842 INFO \[localhost-startStop-1\] \[BootstrapLoaderListener\] App classloader is the same as web app classloader  
2020-05-21 15:38:25,863 INFO \[localhost-startStop-1\] \[lifecycle\] Starting Bamboo 5.14.1 (build #51413 Fri Nov 04 10:05:38 GMT 2016) using Java 1.8.0_241 from Oracle Corporation  
2020-05-21 15:38:25,863 INFO \[localhost-startStop-1\] \[lifecycle\] Real path of servlet context: /opt/atlassian-bamboo-5.14.1/atlassian-bamboo/  
2020-05-21 15:38:26,060 INFO \[localhost-startStop-1\] \[DefaultBootstrapManager\] Running pre-bootstrap validation tasks  
2020-05-21 15:38:26,167 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] -----------------------------------------------------------------  
2020-05-21 15:38:26,167 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] 4300 : Make sure there's single row in HIBERNATE_UNIQUE_KEY table  
2020-05-21 15:38:26,167 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] -----------------------------------------------------------------  
2020-05-21 15:38:26,396 INFO \[MLog-Init-Reporter\] \[MLog\] MLog clients using slf4j logging.  
2020-05-21 15:38:26,515 INFO \[localhost-startStop-1\] \[C3P0Registry\] Initializing c3p0-0.9.5.2 \[built 08-December-2015 22:06:04 -0800; debug? true; trace: 10\]  
2020-05-21 15:38:26,607 INFO \[localhost-startStop-1\] \[AbstractPoolBackedDataSource\] Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@880da778 \[ connectionPoolDataSource -\> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@23fda7af \[ acquireIncrement -\> 1, acquireRetryAttempts -\> 30, acquireRetryDelay -\> 1000, autoCommitOnClose -\> false, automaticTestTable -\> null, breakAfterAcquireFailure -\> false, checkoutTimeout -\> 0, connectionCustomizerClassName -\> null, connectionTesterClassName -\> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -\> caller, debugUnreturnedConnectionStackTraces -\> false, factoryClassLocation -\> null, forceIgnoreUnresolvedTransactions -\> false, forceSynchronousCheckins -\> false, identityToken -\> 1br9xikaafg30dg182y0sn\|11f4da58, idleConnectionTestPeriod -\> 100, initialPoolSize -\> 0, maxAdministrativeTaskTime -\> 0, maxConnectionAge -\> 0, maxIdleTime -\> 30, maxIdleTimeExcessConnections -\> 0, maxPoolSize -\> 25, maxStatements -\> 0, maxStatementsPerConnection -\> 0, minPoolSize -\> 0, nestedDataSource -\> com.mchange.v2.c3p0.DriverManagerDataSource@b3cee514 \[ description -\> null, driverClass -\> null, factoryClassLocation -\> null, forceUseNamedDriverClass -\> false, identityToken -\> 1br9xikaafg30dg182y0sn\|71ee58d0, jdbcUrl -\> jdbc:mysql://localhost/bamboo?autoReconnect=true\&useUnicode=true\&characterEncoding=utf8\&sessionVariables=storage_engine=InnoDB, properties -\> {user=\*\*\*\*\*\*, password=\*\*\*\*\*\*} \], preferredTestQuery -\> null, privilegeSpawnedThreads -\> false, propertyCycle -\> 0, statementCacheNumDeferredCloseThreads -\> 0, testConnectionOnCheckin -\> false, testConnectionOnCheckout -\> false, unreturnedConnectionTimeout -\> 0, usesTraditionalReflectiveProxies -\> false; userOverrides: {} \], dataSourceName -\> null, extensions -\> {}, factoryClassLocation -\> null, identityToken -\> 1br9xikaafg30dg182y0sn\|5c292a01, numHelperThreads -\> 3 \]  
2020-05-21 15:38:26,885 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] Completed task 4300 successfully.  
2020-05-21 15:38:26,885 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] -------------------------------------------------------------------------  
2020-05-21 15:38:26,885 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] 4410 : Make sure that all branch keys start with their master's chain key  
2020-05-21 15:38:26,885 INFO \[localhost-startStop-1\] \[AbstractUpgradeManager\] -------------------------------------------------------------------------  
**++2020-05-21 15:38:26,891 ERROR \[localhost-startStop-1\] \[AbstractUpgradeManager\] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'BRANCH.MASTER_ID' in 'on clause'++**   
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'BRANCH.MASTER_ID' in 'on clause'  
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)  
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)  
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)  
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  
at com.mysql.jdbc.Util.handleNewInstance(Util.java:403)  
at com.mysql.jdbc.Util.getInstance(Util.java:386)  
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:944)  
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)  
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)  
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)  
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)  
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)  
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2439)  
at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1365)  
at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:327)  
at com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey$1.doInHibernateTransaction(BranchKeyStartsWithMastersChainKey.java:55)  
at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:83)  
at com.atlassian.bamboo.upgrade.tasks.validation.BranchKeyStartsWithMastersChainKey.doUpgrade(BranchKeyStartsWithMastersChainKey.java:45)  
at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:206)  
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.runValidationTests(BootstrapUpgradeManagerImpl.java:84)  
at com.atlassian.bamboo.setup.DefaultBootstrapManager.runValidationTasks(DefaultBootstrapManager.java:473)  
at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:340)  
at com.atlassian.config.bootstrap.DefaultAtlassianBootstra


Answers:
author: Daniel Ebers
body: Hi Vijay,

it looks that, for some reason, the database is lacking (at least) the column which the error message is referring to.

Please check if the database is in a consistent state after/during upgrade.

If it shouldn't help please reach out to Bamboo support.

Cheers,  
Daniel