Bamboo upgrade fails - Task for build 51012 failed

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

Problem

Bamboo fails during upgrade and the following message can be observed in the <bamboo-home-directory>/logs/atlassian-bamboo.log file:

2016-02-09 06:39:25,578 INFO [localhost-startStop-1] [BootstrapLoaderListener] Starting BootstrapLoaderListener
2016-02-09 06:39:25,579 INFO [localhost-startStop-1] [lifecycle] *******************************
2016-02-09 06:39:25,579 INFO [localhost-startStop-1] [lifecycle] *   Bamboo is starting up     *
2016-02-09 06:39:25,579 INFO [localhost-startStop-1] [lifecycle] *******************************
2016-02-09 06:39:25,580 INFO [localhost-startStop-1] [ServletContextHolder] Setting servlet context: Bamboo
2016-02-09 06:39:25,615 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.*
2016-02-09 06:39:27,095 INFO [localhost-startStop-1] [lifecycle] Starting Bamboo 5.10.1.1 (build #51018 Mon Feb 08 03:41:55 EST 2016) using Java 1.8.0_71 from Oracle Corporation
2016-02-09 06:39:27,096 INFO [localhost-startStop-1] [lifecycle] Real path of servlet context: /opt/bamboo-5.10.1.1/atlassian-bamboo-5.10.1.1/atlassian-bamboo/
2016-02-09 06:39:27,293 INFO [localhost-startStop-1] [DefaultBootstrapManager] Running pre-bootstrap validation tasks
2016-02-09 06:39:27,356 INFO [localhost-startStop-1] [AbstractUpgradeManager] -----------------------------------------------------------------
2016-02-09 06:39:27,356 INFO [localhost-startStop-1] [AbstractUpgradeManager] 51012 : Make sure that MySQL server uses InnoDB engine for tables
2016-02-09 06:39:27,356 INFO [localhost-startStop-1] [AbstractUpgradeManager] -----------------------------------------------------------------
2016-02-09 06:39:27,441 INFO [localhost-startStop-1] [MLog] MLog clients using log4j logging.
2016-02-09 06:39:27,510 INFO [localhost-startStop-1] [C3P0Registry] Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
2016-02-09 06:39:27,613 INFO [localhost-startStop-1] [AbstractPoolBackedDataSource] Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@1a3ceead [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@b9f7e5ee [ acquireIncrement -> 1, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1br9wfs9e1iw25blnl7s1l|162679d7, idleConnectionTestPeriod -> 100, initialPoolSize -> 0, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 30, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 0, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@f4db8f93 [ description -> null, driverClass -> null, factoryClassLocation -> null, identityToken -> 4fd6odf6v2in45bln87s2l|5b40397d, jdbcUrl -> jdbc:mysql://localhost/bamboo?autoReconnect=true, properties -> {user=******, password=******} ], preferredTestQuery -> null, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, factoryClassLocation -> null, identityToken -> 4fd6odf6v2in45bln87s2l|5b40397d, numHelperThreads -> 3 ]
2016-02-09 06:39:27,913 INFO [localhost-startStop-1] [AbstractUpgradeManager] Completed task 51012 with errors.
2016-02-09 06:39:27,913 FATAL [localhost-startStop-1] [DefaultBootstrapManager] Pre-bootstrap upgrade tasks failed
com.atlassian.upgrade.UpgradeException: Pre-bootstrap validation tests failed: [Task for build 51012 failed:, Bamboo DB must use InnoDB table engine.]
	at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:342)
	at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)
	at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:117)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
...

Cause

Bamboo is failing to start because the upgrade task 51012 failed. The default storage engine for MySQL is MyISAM. Because this storage engine does not support referential integrity, foreign key constraints or transactions, using it may lead to data corruption. This is happening because the Bamboo database is not using the InnoDB table engine. To connect Bamboo to an external MySQL database, the database must be configured to use the InnoDB storage engine.

Resolution

If your MySQL database server is configured to use a storage engine other than InnoDB by default (such as MyISAM), change it to use InnoDB. You can make this the default MySQL Server setting by adding this option to the my.ini (or my.cnf) configuration file. Otherwise, you can configure Bamboo's JDBC connection to your MySQL database so that any tables which Bamboo creates in this database will be done using the InnoDB database engine. In this case you'll have to include the sessionVariables=storage_engine=InnoDB flag in the Database URL. As an example:

jdbc:mysql://localhost/bamboo?autoReconnect=true&useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB


This information is also included in the https://confluence.atlassian.com/display/BAMBOO/mysql documentation.

 

Last modified on Nov 2, 2018

Was this helpful?

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