Jira をリバース プロキシ (またはロード バランサ) の背後で実行しているときにカスタマー ポータルを読み込めない
プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム。
この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。
*Fisheye および Crucible は除く
要約
症状
Jira Service Management のカスタマー ポータルにアクセスしたときにポータルが読み込まれず、代わりに空白のページが表示される。

予想される結果
カスタマー ポータルが読み込まれる。

診断
Jira がロード バランサまたはリバース プロキシの背後で実行されている
The SSL protocol is configured at the load balancer (or reverse proxy) level
問題を再現しているときに収集した HAR ファイル (またはブラウザのネットワーク タブ) を見ると、Jira のベース URL が HTTPS を使用して構成されているにもかかわらず、Jira Service Management が何らかの Javascript を HTTP の URL 経由で読み込もうとしている

コンソール ログを確認すると、ページが "mixed content" によってブロックされた旨のエラーがある
1:4 Mixed Content: The page at 'https://JIRA_DOMAIN/servicedesk/customer/portal/1' was loaded over HTTPS, but requested an insecure script 'http://JIRA_DOMAIN/s/f4cbae4fba07da7db5e0b98c8ce4618e-CDN/wmo8yh/813000/6411e0087192541a09d88223fb51a6a0/add9c254b8e5b2bbfdb57038dcb349ab/_/download/contextbatch/js/jira.webresources:almond,customerportal,com.atlassian.analytics.analytics-client:js-events/batch.js?locale=en-US'. This request has been blocked; the content must be served over HTTPS.
There is a proxied Tomcat connector in the file <JIRA_INSTALLATION_FOLDER>/conf/server.xml, which is configured without the parameter scheme="https":
<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8082" protocol="HTTP/1.1" redirectPort="8443" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>" useBodyEncodingForURI="true" proxyName="somehostname.com" proxyPort="443"/>
原因
Javascript の URL を構築する Jira Service Management のコードは、Jira で定義されたベース URL (HTTPS を利用) のプロトコルではなく、Tomcat コネクタから渡されたプロトコル (HTTP) を使います。
Tomcat コネクタが HTTPS スキームのパラメーターで構成されていないため、構築されるすべての Javascript URL が HTTPS ではなく HTTP を使用しています。カスタマー ポータルはブラウザで HTTPS 経由でアクセスされるため、コンテンツの混在が発生し、ポータルの読み込みがブラウザによって自動的にブロックされました。
ソリューション
回避策
Add the parameter scheme="https" to the server.xml of the Jira application (or each Jira node of the cluster if using Jira Data Center)
<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8082" protocol="HTTP/1.1" redirectPort="8443" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^\`"<>" useBodyEncodingForURI="true" proxyName="somehostname.com" proxyPort="443" scheme="https"/>Jira アプリケーション (Jira Data Center を使用している場合はクラスタの Jira ノード) を再起動します
この内容はお役に立ちましたか?