Bamboo is not able to stop a build

お困りですか?

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

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

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.

*Fisheye および Crucible は除く

    

要約

Bamboo is not able to stop a build currently running in the build queue.

環境

Any supported version of Bamboo. 

診断

When a user tries to stop a build from the UI, the action seems to do nothing. In the logs we will see a message similar to this one:

atlassian-bamboo.log
2022-06-21 06:28:46,560 INFO [http-nio-8080-exec-175] [DefaultStopBuildManager] : Request to stop 'PR-PL-JOB-1'
2022-06-21 06:28:46,560 INFO [http-nio-8080-exec-175] [DefaultStopBuildManager] Stopping build PR-PL-JOB-1 on agent 12341234
2022-06-21 06:28:46,564 INFO [http-nio-8080-exec-175] [ForceBuildStopper] Handling event com.atlassian.bamboo.event.BuildCanceledEvent[source=com.atlassian.bamboo.build.DefaultStopBuildManager@61d65d10] job=PR-PL-JOB #1
2022-06-21 06:28:46,568 ERROR [http-nio-8080-exec-175] [AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.bamboo.event.BuildCanceledEvent[source=com.atlassian.bamboo.build.DefaultStopBuildManager@61d65d10] job=PR-PL-JOB #1] from the invoker [com.atlassian.event.internal.ComparableListenerInvoker@51981cd8]
com.atlassian.bamboo.build.BuildDefinitionManager$BuildDefinitionNotFoundException: No plan exists for PR-PL-JOB
at com.atlassian.bamboo.build.DefaultBuildDefinitionManagerTx.getNotNullPlanByKey(DefaultBuildDefinitionManagerTx.java:141)
   at com.atlassian.bamboo.build.DefaultBuildDefinitionManagerTx.getBuildDefinition(DefaultBuildDefinitionManagerTx.java:58)
   at sun.reflect.GeneratedMethodAccessor8159.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
(...)


原因

The key clue of the error is "No plan exists for...". The reason why this happens is because the exact PROJECT-PLAN-JOB definition doesn't exist anymore in the DB. Possible reasons for this can be:

  • The plan being moved from one project to another mid-execution.
  • The job being deleted.
  • The plan being deleted.
  • Any other that would break the key "PR-PL-JOB"

At this point, the build queue is in an inconsistent state. The build on queue is now orphan and cannot be recovered.

ソリューション

Restarting Bamboo will empty the build queue, solving the problem.


最終更新日 2022 年 8 月 12 日

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

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