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

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

We see this type of errors in the Bamboo logs:

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

原因

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.

ソリューション

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

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

    update build set marked_for_deletion = 1 where full_key like "%TESTA-TSTA%"
  4. Restart Bamboo afterwards
最終更新日 2014 年 8 月 18 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.