Cannot sync repositories with the DVCS plugin
Platform Notice: Data Center Only - This article only applies to Atlassian apps 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
Symptoms
After adding a DVCS account (Github or Bitbucket does not matter), the repositories are not synced and there are no error messages in the DVCS administration UI. Clicking on the Sync button for each repository does nothing.
The following appears in the atlassian-jira.log:
2014-04-29 00:50:53,132 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
2014-04-29 00:50:53,132 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
2014-04-29 00:50:53,132 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
2014-04-29 00:50:53,133 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
2014-04-29 00:50:53,133 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
2014-04-29 00:50:53,133 QuartzScheduler_Worker-0 INFO ServiceRunner com.atlassian.jira.plugins.dvcs.scheduler.DvcsScheduler:job [dvcs.sync.impl.DefaultSynchronizer] The synchronization is disabled.
Diagnosis
You have recently migrated from JIRA OnDemand to JIRA self-hosted (Behind-the-firewall), and the OnDemand XML Backup was created sometime during the BitBucket performance issue which happened sometime on May 1st2014.
Note that this is not the only way to bump into this issue, but other possibilities are currently unknown.
Cause
The Sync functionality has been forcefully disabled. Referencing this bit of code in the DVCS Connector plugin, we can see the relevant code lines throwing the "Synchronization is disabled" message in the logs:
@Override
public void doSync(Repository repo, EnumSet<SynchronizationFlag> flags)
{
if (featureManager.isEnabled(DISABLE_SYNCHRONIZATION_FEATURE))
{
log.info("The synchronization is disabled.");
return;
}The reference values that determines synchronization capabilities can be found in this part of the code:
/**
* Synchronization service
*/
public class DefaultSynchronizer implements Synchronizer, DisposableBean, InitializingBean
{
private final Logger log = LoggerFactory.getLogger(DefaultSynchronizer.class);
private final String DISABLE_SYNCHRONIZATION_FEATURE = "dvcs.connector.synchronization.disabled";
private final String DISABLE_FULL_SYNCHRONIZATION_FEATURE = "dvcs.connector.full-synchronization.disabled";
private final String DISABLE_PR_SYNCHRONIZATION_FEATURE = "dvcs.connector.pr-synchronization.disabled";These values actually populate the feature table in the JIRA database, and if the *dvcs.connector.synchronization.disabled property exists in the feature table, the DVCS plugin will not sync its repositories.
Solution
Resolution
Ensure that you have backed up your JIRA database before performing a direct SQL delete command.
Check if the Sync functionality is disabled in the database by running this SQL command:
SELECT * FROM feature WHERE FEATURE_NAME LIKE '%synchronization%';ℹ️ If no values return, it may be that the table name is case-sensitive. Try selecting without the LIKE clause.
The above SQL should return a value containing dvcs.connector.synchronization.disabled
Deleting this row and restarting JIRA will restore Sync capabilities.
Was this helpful?