Unable to create Stash trigger in JIRA when using Nginx

お困りですか?

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

コミュニティに質問

 

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

問題

JIRA is behind an Nginx reverse-proxy and linked to Stash. All JIRA/Stash linked functionality works except for Stash related trigger creation (commit, branch, pull request, or review) when editing a workflow in JIRA.

Prior to clicking the 'Add trigger' button, the below Diagnostics pop-up window reports an error stating that Stash is not able to communicate with JIRA.

診断

環境

  • JIRA behind Nginx reverse-proxy
  • Stash linked to JIRA
  • All JIRA/Stash application link functionality works except for trigger creation

原因

Stash has an application link cache that assumes there are two "Cache-Control" headers present: "max-age" and "stale-while-revalidate". These header values control the cache and when absent, cause the cache to never load the data required for Stash to connect to JIRA. Due to the Nginx configuration, these header values are being overwritten preventing Stash to connect to JIRA.

ソリューション

Explicitly set the ”max-age" & "stale-while-revalidate" headers in the Nginx configuration. Make sure "proxy_hide_header Cache-Control;” is not set.

add_header Cache-Control "no-transform, max-age=600, stale-if-error=86400, stale-while-revalidate=86400";

Jira を再起動します。

最終更新日: 2016 年 2 月 26 日

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

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