Collaborative Editing error in Confluence Data Center due to blocked mixed content
プラットフォームについて: 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 は除く
問題
When setting up Confluence Data Center and Synchrony with SSL, Collaborative Editing fails and you get a blocked mixed content error in the console. For example with Chrome, you can go to Menu → More tools → Developer Tools → Console and see the following:
Mixed Content: The page at 'https://confluence.url.com/display/SPACE/Page+title batch.js?analytis-e...s-enabled=true...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://synchrony.url.com:8091/synchrony/heartbeat'. This request has been blocked; the content must be served over HTTPS.
診断
環境
- Confluence node running behind HTTPS
- Synchrony service is not running behind HTTPS
Diagnostic Steps
- Running both behind HTTP works
- Loading the http://synchrony.url.com:8091/synchrony/heartbeat URL from the Confluence node returns an OK message
原因
Modern browsers block mixed content when a page is initially loaded over HTTPS, but other resources are loaded over HTTP. In this example, Confluence resources are loading over HTTPS, but Synchrony scripts are running from an HTTP address. This causes the error above. Both services should run behind HTTPS.
回避策
This might be helpful to confirm you're seeing this issue and will not resolve the issue, but these can be applied temporarily:
- Configure Confluence to run on HTTP
- Disable Collaborative Editing
- Disable mixed content blocking in the browser
ソリューション
To resolve the issue:
- Configure Synchrony to run behind SSL
- This has to be done using a Load Balancer or Proxy
- 例:
- Add a /synchrony rule to redirect requests to the Synchrony URL, on the same Load balancer that Confluence is running behind: How to configure Amazon Web Service Application Load Balancer with Confluence
- Ensure the Synchrony SSL certificate is imported into the Confluence truststore: Connecting to SSL services
Restart Synchrony with SYNCHRONY_URL set to the HTTPS address (e.g. SYNCHRONY_URL=https://load_balancer_url/synchrony)
Point Confluence to the same Synchrony HTTPS address (e.g. -Dsynchrony.service.url=https://load_balancer_url/synchrony/v1)
- Restart and test