How to check the status of Synchrony for Confluence Data Center

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.

Purpose

This article explains how to check the status of your Synchrony nodes for Confluence Data Center. In Confluence Data Center 6.x, Synchrony must be accessible to both Confluence and the user's browser. 

Synchrony is the engine which runs Collaborative Editing, and can be running on one or more nodes in Confluence Data Center.

Environment

Confluence Data Center 6.0 to 6.11

Confluence Data Center 6.12 and later, where you've chosen to run Synchrony standalone cluster. See Possible Confluence and Synchrony Configurations for more info.

How to confirm Synchrony is running outside of the Confluence web UI

There are several things to check to ensure your Synchrony node(s) respond and can be accessed by Confluence and your web browser. 

Heartbeat check - Confirm proper traffic routing to Synchrony node(s)

Check the following endpoint via your web browser to ensure Synchrony is responding:

<confluence-base-url-without-context-path>/synchrony/heartbeat

This should also be checked via curl on the Confluence application server, to ensure Confluence can reach the Synchrony cluster (or single node) via the Load Balancer:

$ curl <confluence-base-url-without-context-path>/synchrony/heartbeat
Expected Response
OK

An OK indicates the reverse proxy & other infrastructure is properly routing traffic to Synchrony.

Other responses

If you receive any other response, such as a 404, 500, or similar HTTP error code, Collaborative Editing will not function properly.

If the above URL directs you to a Confluence page stating "Page Not Found": There is a misconfiguration of your reverse proxy which is directing the  /synchrony/*  traffic to your Confluence webserver instead of your Synchrony server. 

Synchrony Plugin Status check 

This determines whether the Synchrony Interop Bootstrap Plugin is enabled, and the state of Collaborative Editing (the feature) on the Confluence application.

  1. First, navigate in your browser to  > General Configuration
    1. This will require you to enter your Admin password for websudo, which is required for the next step.
  2. Next, direct your browser to the following URL in the address bar: 

    <confluence-base-url>/rest/synchrony-interop/status

To curl this rest endpoint it requires temporarily disabling websudo (not recommended):  > Confluence Admin > Security Configurations > Uncheck "Secure administrator sessions"

This is the check to see whether Collab Editing is enabled on the Confluence side (e.g. On/Off). This does not check if the feature is actually working or if Synchrony is running. This should return a JSON style result as noted below. 

Sample Result
{
	"synchronyEnabled": true,
	"sharedDraftsEnabled": true
}

True indicates the Synchrony plugin is enabled and the Collaborative Editing feature is enabled in Confluence.

False indicates the Collaborative Editing feature is disabled.

This does not check anything on the remote Synchrony node/process.

If you receive a 404 Page Not Found here, the Synchrony Interop Bootstrap Plugin is disabled or not functioning properly: Unable to edit pages or enable Collaborative Editing on Confluence due to disabled system plugins

Synchrony Service connectivity check

This check determines whether the Confluence process can talk to the remote (or local) Synchrony process.

  1. First, navigate in your browser to   > General Configuration
    1. This will require you to enter your Admin password for websudo, which is required for the next step.
  2. Next, direct your browser to the following URL in the address bar: 

    <confluence-base-url>/rest/synchrony-interop/synchrony-status

To curl this rest endpoint it requires temporarily disabling websudo (not recommended):  > Confluence Admin > Security Configurations > Uncheck "Secure administrator sessions"

Results

This check returns a state of either "running" or "stopped" like these examples:

{"status": "stopped"}
{"status":"running"}
tip/resting Created with Sketch.

Running indicates Synchrony is accessible from and responsive to the Confluence node. This means the Confluence node itself can talk to the Synchrony node(s).

Stopped indicates a problem: either Synchrony is not running, or Confluence cannot reach the Synchrony node.

If you receive a 404 or Page Not Found here, the Synchrony Interop Bootstrap Plugin is disabled or not functioning properly: Unable to edit pages or enable Collaborative Editing on Confluence due to disabled system plugins


Synchrony websockets check

Websockets are needed (unless XHR fallback is enabled) to connect the user's browser to Synchrony directly, which allows data to be "pushed" from the server to the browser.

This test will confirm whether websocket connections can be made to the Synchrony service

  1. Connect to the node where Synchrony is running on via SSH
  2. Execute the following command to test websockets is functioning within the Synchrony process: 
    1. Confluence 6.0 - 6.4: 

      $ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: 33xyqDvzAXTYgsjjbaYD5A==" --header "Sec-WebSocket-Version: 13" http://SYNCHRONY_SERVER_IP_ADDRESS:8091/synchrony/sockjs/v1/018/u4q4rohu/websocket

    2. Confluence 6.5+: 

      $ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: 33xyqDvzAXTYgsjjbaYD5A==" --header "Sec-WebSocket-Version: 13" http://SYNCHRONY_SERVER_IP_ADDRESS:8091/synchrony/v1/bayeux-sync1

      The above must be HTTP and the SYNCHRONY SERVER IP ADDRESS (and not localhost) as Synchrony DC binds explicitly on the Synchrony Server IP address

  3. Should you receive a successful response there, proceed to testing the same from a remote location (such as your laptop) using the base-url instead of the Synchrony Server IP address, like so:
    1. Confluence 6.0 - 6.4: 


      If your OS has curl
      $ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: 33xyqDvzAXTYgsjjbaYD5A==" --header "Sec-WebSocket-Version: 13" http://<confluence-base-url-without-context-path>/synchrony/sockjs/v1/018/u4q4rohu/websocket
      Windows has no curl, so run these set of commands in a Windows Powershell:
      $headers = @{}
      $headers.Add("Connection","Upgrade")
      $headers.Add("Upgrade","websocket")
      $headers.Add("Sec-WebSocket-Key","33xyqDvzAXTYgsjjbaYD5A==")
      $headers.Add("Sec-WebSocket-Version","13")
      
      Invoke-WebRequest -Uri "http://<confluence-base-url-without-context-path>/synchrony/sockjs/v1/018/u4q4rohu/websocket" -UseBasicParsing -Headers $headers
      
    2. Confluence 6.5+: 


      If your OS has curl
      $ curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Sec-WebSocket-Key: 33xyqDvzAXTYgsjjbaYD5A==" --header "Sec-WebSocket-Version: 13" "http://<confluence-base-url-without-context-path>/synchrony/v1/bayeux-sync1
      Windows has no curl, so run these set of commands in a Windows Powershell:
      $headers = @{}
      $headers.Add("Connection","Upgrade")
      $headers.Add("Upgrade","websocket")
      $headers.Add("Sec-WebSocket-Key","33xyqDvzAXTYgsjjbaYD5A==")
      $headers.Add("Sec-WebSocket-Version","13")
      
      Invoke-WebRequest -Uri "http://<confluence-base-url-without-context-path>/synchrony/v1/bayeux-sync1" -UseBasicParsing -Headers $headers

In this step, substitute the above base url from HTTP to HTTPS if HTTPS is used at the Load Balancer

Successful Response

Look for the 1.1 101 Switching Protocols and Sec-Websocket-Accept in the response, such as in this successful example: 

Successful web sockets test using curl
HTTP/1.1 101 Switching Protocols
Server: Apache-Coyote/1.1
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Accept: RV68WHXjNM0H+IFE5/W1ioLmMHI=
 
?o?a["[39,1,256,20000]"]
Successful web sockets test using Invoke-WebRequest on Windows Powershell
StatusCode        : 101
StatusDescription : Switching Protocols
Content           : {}
RawContent        : HTTP/1.1 101 Switching Protocols
                    Upgrade: websocket
                    Connection: upgrade
                    Sec-WebSocket-Accept: RV68WHXjNM0H+IFE5/W1ioLmMHI=
                    Date: Mon, 20 Nov 2017 20:12:46 GMT
                    Server: Apache-Coyote/1.1
 
 
Headers           : {[Upgrade, websocket], [Connection, upgrade], [Sec-WebSocket-Accept, RV68WHXjNM0H+IFE5/W1ioLmMHI=], [Date, Mon, 20 Nov 2017 20:12:46 GMT]...}
RawContentLength  : 0


Other Responses

If you do not have a successful response like the above, that indicates websockets may not work from a user's browser to Synchrony.

Collaborative editing works best with a WebSocket connection. If one can't be established due to a timeout, or a proxy server or firewall that doesn't allow WebSocket connections, the editor will attempt to connect via an XML HTTP Request (XHR).

You can use http://websocket.org/echo.html to perform a quick HTML5 WebSocket test against an echo server.


Last modified on Jun 14, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.