Collaborative Editing error in Confluence Data Center due to blocked mixed content
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
Problem
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:
1
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.
Diagnosis
Environment
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
Cause
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.
Workarounds
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
Solution
Resolution
To resolve the issue:
Configure Synchrony to run behind SSL
This has to be done using a Load Balancer or Proxy
Example:
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
Was this helpful?