Database Corruption - Startup page not reachable - Cannot evaluate master chain

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

Symptoms

We see this type of errors in the Bamboo logs:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 2014-08-18 15:41:30,785 INFO [http-bio-10542-exec-25] [RetryingTaskExecutor] Task 'Retrieving TESTA-TSTA0' threw java.lang.IllegalArgumentException: Cannot evaluate master chain, aborting. 2014-08-18 15:41:30,786 ERROR [http-bio-10542-exec-25] [ExceptionMappingInterceptor] java.lang.IllegalArgumentException: Cannot evaluate master chain java.lang.RuntimeException: java.lang.IllegalArgumentException: Cannot evaluate master chain at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:120) at com.atlassian.bamboo.executor.RetryingTaskExecutor.runTask(RetryingTaskExecutor.java:88) at com.atlassian.bamboo.executor.RetryingTaskExecutor.retry(RetryingTaskExecutor.java:191) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl.getPlanByKey(ImmutablePlanManagerImpl.java:129) at sun.reflect.GeneratedMethodAccessor226.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy68.getPlanByKey(Unknown Source) at com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl$1$1.call(ImmutablePlanCacheServiceImpl.java:97) at com.atlassian.bamboo.plan.cache.ImmutablePlanCacheServiceImpl$1$1.call(ImmutablePlanCacheServiceImpl.java:89) at com.atlassian.bamboo.plan.cache.CacheLoadContextSupport.callRethrowingExceptionsAsRuntimeExceptions(CacheLoadContextSupport.java:145) at com.atlassian.bamboo.plan.cache.CacheLoadContextSupport.access$200(CacheLoadContextSupport.java:21) at com.atlassian.bamboo.plan.cache.CacheLoadContextSupport$4$1.doInHibernate(CacheLoadContextSupport.java:122) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) ... Caused by: java.lang.IllegalArgumentException: Cannot evaluate master chain at com.atlassian.bamboo.plan.cache.AbstractImmutableChain.<init>(AbstractImmutableChain.java:84) at com.atlassian.bamboo.plan.branch.cache.ImmutableChainBranchImpl.<init>(ImmutableChainBranchImpl.java:57) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl.createImmutableChain(ImmutablePlanManagerImpl.java:213) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl.getChainByKey(ImmutablePlanManagerImpl.java:156) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl.access$000(ImmutablePlanManagerImpl.java:49) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl$2.call(ImmutablePlanManagerImpl.java:121) at com.atlassian.bamboo.plan.cache.ImmutablePlanManagerImpl$2.call(ImmutablePlanManagerImpl.java:117) at com.atlassian.bamboo.executor.RetryingTaskExecutor.rerun(RetryingTaskExecutor.java:108) ... 291 more

Cause

There are some branches that are orphaned with the main master plan not existing in the database. The error should give a clue as to the branches. In this particular scenario, branch with key TESTA-TSTA0 . This means that the plan with key TESTA-TSTA is missing.

Resolution

The resolution of this type of database corruptions will be to expire the branches and recreate the master plan once again. It is more logical that way than trying to inject the plan with other key constraints in consideration. This can be done by following the steps below:

  1. Shut down Bamboo,

  2. Run the query below to see for you self that the master plan is missing. If it exist, you should see a row with the build_type marked as CHAIN

    1 select * from build where full_key like "%TESTA-TSTA%"
  3. After verifying, run this command to expire the branches

    1 update build set marked_for_deletion = 1 where full_key like "%TESTA-TSTA%"
  4. Restart Bamboo afterwards

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.