-
Bug
-
Resolution: Done
-
Highest
-
5.14.0.1
-
None
-
Severity 1 - Critical
-
Summary
After upgrading to Bamboo 5.14.0.1, one of the upgrade tasks fails and Bamboo won't start up. This upgrade task was fixed with BAM-16446
Expected Results
Bamboo starts up nicely after the upgrade.
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2016-10-29 12:37:38,730 INFO [localhost-startStop-1] [UpgradeLauncher] Initialisation completed. 2016-10-29 12:37:38,737 INFO [localhost-startStop-1] [UpgradeLauncher] Current data is at build number: 51408. Upgrade required. Firing upgrade manager... 2016-10-29 12:37:38,758 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [UpgradeManagerImpl] Found 0 high priority upgrade tasks 2016-10-29 12:37:38,758 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [UpgradeManagerImpl] Found 1 upgrade tasks 2016-10-29 12:37:38,758 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [AbstractUpgradeManager] ----------------------------------------------------- 2016-10-29 12:37:38,758 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [AbstractUpgradeManager] 51410 : Fix Stash ssh keys in branches where possible 2016-10-29 12:37:38,758 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [AbstractUpgradeManager] ----------------------------------------------------- 2016-10-29 12:37:38,825 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [UpgradeTask51410FixStashSshKeys] Resetting ssh key in repository 28573702, branch develop 2016-10-29 12:37:38,885 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [UpgradeTask51410FixStashSshKeys] Resetting ssh key in repository 49250384, branch develop 2016-10-29 12:37:38,906 ERROR [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [AbstractUpgradeManager] java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.fixSingleRepository(UpgradeTask51410FixStashSshKeys.java:111) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.fixSshKeys(UpgradeTask51410FixStashSshKeys.java:72) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.lambda$fixSshKeys$1(UpgradeTask51410FixStashSshKeys.java:83) at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2076) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2073) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:313) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2095) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2080) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$2.doInHibernate(BambooTransactionHibernateTemplate.java:66) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341) at org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$1.doInTransaction(BambooTransactionHibernateTemplate.java:52) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:41) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:47) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.doWork(BambooTransactionHibernateTemplate.java:60) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.fixSshKeys(UpgradeTask51410FixStashSshKeys.java:80) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.lambda$doUpgrade$0(UpgradeTask51410FixStashSshKeys.java:54) at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:54) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2076) at org.hibernate.internal.SessionImpl$2.accept(SessionImpl.java:2073) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:313) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2095) at org.hibernate.internal.SessionImpl.doWork(SessionImpl.java:2080) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$2.doInHibernate(BambooTransactionHibernateTemplate.java:66) at org.springframework.orm.hibernate4.HibernateTemplate.doExecute(HibernateTemplate.java:341) at org.springframework.orm.hibernate4.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:309) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$1.doInTransaction(BambooTransactionHibernateTemplate.java:52) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:41) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:47) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.doWork(BambooTransactionHibernateTemplate.java:60) at com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys.doUpgrade(UpgradeTask51410FixStashSshKeys.java:51) at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:206) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:114) at com.atlassian.bamboo.upgrade.UpgradeLauncher$1.call(UpgradeLauncher.java:117) at com.atlassian.bamboo.upgrade.UpgradeLauncher$1.call(UpgradeLauncher.java:113) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 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 com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:51) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) 2016-10-29 12:37:38,907 INFO [15-UpgradeTaskBackgroundThread:pool-30-thread-1] [AbstractUpgradeManager] Completed task 51410 successfully. 2016-10-29 12:37:38,908 FATAL [localhost-startStop-1] [UpgradeLauncher] Upgrade task error: Task for build 51410 failed with exception: null 2016-10-29 12:37:38,922 INFO [localhost-startStop-1] [CompressingFilter] CompressingFilter has initialized 2016-10-29 12:37:39,284 INFO [localhost-startStop-1] [SpringObjectFactory] Setting autowire strategy to name 2016-10-29 12:37:39,284 INFO [localhost-startStop-1] [StrutsSpringObjectFactory] Struts-Spring integration initialised successfully 2016-10-29 12:37:39,948 INFO [localhost-startStop-1] [Dispatchers] Dispatcher org.apache.struts2.dispatcher.Dispatcher initialised 2016-10-29 12:37:40,002 INFO [localhost-startStop-1] [SpringObjectFactory] Setting autowire strategy to name 2016-10-29 12:37:40,002 INFO [localhost-startStop-1] [StrutsSpringObjectFactory] Struts-Spring integration initialised successfully 2016-10-29 12:37:40,892 INFO [localhost-startStop-1] [AccessLogFilter] AccessLogFilter initialized. Format is: <user> <url> <starting memory free (kb)> +- <difference in free mem (kb)> <query time (ms)> 2016-10-29 12:37:40,953 INFO [localhost-startStop-1] [SpringObjectFactory] Setting autowire strategy to name 2016-10-29 12:37:40,953 INFO [localhost-startStop-1] [StrutsSpringObjectFactory] Struts-Spring integration initialised successfully 2016-10-29 12:37:41,158 INFO [localhost-startStop-1] [Dispatchers] Dispatcher org.apache.struts2.dispatcher.Dispatcher initialised 2016-10-29 12:37:41,202 INFO [localhost-startStop-1] [SpringObjectFactory] Setting autowire strategy to name 2016-10-29 12:37:41,202 INFO [localhost-startStop-1] [StrutsSpringObjectFactory] Struts-Spring integration initialised successfully 2016-10-29 12:37:41,564 INFO [http-nio-8085-exec-2] [JohnsonFilter] The application is still starting up, or there are errors. Redirecting request from
Workaround
- Before bamboo releases 5.14.0.2+:
- Stop bamboo
- Find the following line in <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes/upgrades.xml:
<upgrade build="51410" class="com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys"/>
- Update it by commenting out the entry to:
<!-- <upgrade build="51410" class="com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys"/> -->
- Start Bamboo. That will upgrade your application.
- Revert the temporary workaround after upgrading to 5.14.0.2+:
- Stop Bamboo
- Uncomment upgrade task by editing <Bamboo Install Directory>/atlassian-bamboo/WEB-INF/classes/upgrades.xml again. I.e. put it back like:
<upgrade build="51410" class="com.atlassian.bamboo.upgrade.tasks.v5_14.UpgradeTask51410FixStashSshKeys"/>
- Change buildNumber in bamboo.cfg.xml in your $BAMBOO_HOME to one before the commented upgrade task which is 51409 in this case
- Start Bamboo
This guarantees that when upgrading Bamboo in the future, task 51410 will be executed again.
- relates to
-
BAM-16446 Branch Plan SSH keys for Stash linked repositories are not updated when the keys are regenerated
- Closed
- is cloned as
-
BDEV-12251 Loading...
- mentioned in
-
Page Loading...