Problem

User Sync can't run another synchronization because it is falsely reporting that another sync is still running.

Cause

Sometimes User Sync is not able to complete a sync because of unforeseen events which cannot be catched in our app's code directly,
an intermittent database outage for instance.

Solution

Until we've implemented a notification for that directly, you can monitor the log file after changing the logging as per the these instructions:

Change Loglevel (Only before SAML version 4.0.8 / User Sync version 1.9.3)

Since SAML version 4.0.8 / User Sync version 1.9.3, the messages are logged with level ERROR,

so you don't need to change anything as described below. Just skip and read Alert For Log Entries below further below.

Add a new package to the log for your Atlassian host product and make sure it's persistent across instance restarts.
See the instructions on how to do that for Jira, Confluence, Bitbucket, Bamboo and Fisheye/ Crucible.

The below package needs to be logged with DEBUG level.

de.resolution.usersync.impl.SyncStatusAoProxy
CODE

Alert For Log Entries

Whenever User Sync is not able to proceed properly, a record like the below will be created. The number can differ but the rest is the same.
Based on this you can setup an alert/ automation to get notified.

2020-01-13 08:43:13,542 Caesium-1-4 ERROR ServiceRunner [d.r.usersync.impl.SyncStatusAoProxy] Set result in 149 to FAILED
BASH