Trying to rerun failed or incomplete jobs result in XSRF: A mutative operation was attempted on BuildResultsSummaryImpl within a non-mutative HTTP request

お困りですか?

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

コミュニティに質問


プラットフォームについて: 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 は除く

要約

Trying to rerun failed or incomplete jobs by right-clicking Run > Rerun failed/incomplete jobs only and attempting to open the link in a new tab in your web browser results in the following errors thrown by Bamboo:

環境

This was verified on Bamboo 6.9.2, 7.0.3, 7.1.2 and 7.2.1 but may affect other Bamboo versions as well given the nature of the problem.

診断

  • This usually only happens when opening the link to Run > Rerun failed/incomplete jobs only in a new tab.
  • In certain cases the problem seems to persist and further attempts to click Run > Rerun failed/incomplete jobs only or Run > Run plan without opening the link on a new tab will continue to throw errors.

原因

原因 1

This is caused by the fact that Bamboo is expecting a POST request when clicking the Run > Rerun failed/incomplete jobs only option from the UI. However, when attempting to open that link in a new tab the web browser will trigger a GET request instead. You can search for the request received by Bamboo in the <Bamboo server home directory>/logs/atlassian-bamboo-access.log file:

2021-01-22 10:43:14,999 INFO [http-nio-8085-exec-5] [AccessLogFilter] username GET http://bamboo:8085/build/admin/restartBuild.action?planKey=PROJ-PLAN&buildNumber=13 156766kb

Bamboo doesn't accept GET requests on the restartBuild.action and the error is thrown.


原因 2

This also could be caused by important script resources missing in the Bamboo server. You may see the below errors in atlassian-bamboo.log.

2022-03-19 21:11:00,943 WARN [http-nio-8085-exec-6] [AbstractDownloadableResource] Resource not found: Resource: bamboo.web.resources /scripts/xsrf.js (null)


ソリューション

  • If you are trying to rerun failed or incomplete jobs don't try to open the link in a new tab to if you want to avoid running into this issue.
  • In case you have accidentally or unknowingly tried to open the Run > Rerun failed/incomplete jobs only in a new tab and now further attempts to rerun or trigger a new build inside that plan fail with the same error message, try disabling/enabling the affected plan.
  • Please check the <bamboo-install>/atlassian-bamboo/scripts directory and verify xsrf.js is present


最終更新日 2022 年 8 月 2 日

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

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