Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Synology Snapshot Replication "Failed to sync replication": Permission Error, Connection Failed and Relationship Broken

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

A Synology replication task stops working. In Snapshot Replication the task shows a status such as Permission Error or Connection Failed, or Replication Failed, and the log carries a line that begins "Failed to sync replication". The status and the reason in that log line are two different things, and each has its own fix on Synology's page.

What follows sets out what Synology says each status and each log reason means, how to tell them apart without changing anything, and the fix for each, with the risks written before the step.

What the error means

Synology's page "What can I do if a replication task fails?" lists the statuses a failed task can show in Snapshot Replication, under Replication: Permission Error, Permission Error for Inbound Access, Connection Failed, Inbound Connection Failed, Relationship Broken and Replication Failed.

For Replication Failed the reason is in the log. Synology says to go to Snapshot Replication, then Log, and search for "Failed to sync replication", where "you will find descriptions similar to the following": "Failed to sync replication of STORAGE TYPE [SOURCE SERVER] to [DESTINATION SERVER] due to [Error Message]."

The error messages Synology lists after "due to" are Connection Failed, Connection for Data Syncing Failed, Credential Operation Failed, Reached the maximum number of snapshots, Not a destination server, and Others.

Likely causes

Status or log reason What Synology's fix is aimed at
Permission Error, Permission Error for Inbound Access The partner server's username and password stored in the task
Connection Failed, Inbound Connection Failed The network path: MTU, firewalls, the IP address and ports, encryption, or a device between the servers
Relationship Broken The task itself, which is created again
Log reason: Connection Failed, Connection for Data Syncing Failed, Credential Operation Failed One shared fix: MTU, firewalls, connection settings
Log reason: Reached the maximum number of snapshots Snapshot retention
Log reason: Not a destination server A task left in a failover state, fixed by re-protecting it
Log reason: Others Logs from both servers for Synology support

Two facts from Synology's Replication page bear on connection faults. The data transfer port is 5566 for shared folders and thin-provisioned LUNs in volumes using Btrfs, and 3261 for thin-provisioned LUNs with advanced features in volumes using ext4. And "If source and destination servers connect through different routers, set up port forwarding first."

Prove the cause before changing anything

Everything in this section reads only. Do not save any window you open.

  1. Write down the status shown for the task in Snapshot Replication, then Replication, and the time.

  2. Open Snapshot Replication, then Log, and search for "Failed to sync replication". Write down the exact text after "due to". This decides which row of the table above applies.

  3. Check which server you are on. Synology says: "You can only edit replication tasks on the source" and "You can only sync replication tasks on the source."

  4. Check the MTU on both servers. On each, go to Control Panel, then Network, then Network Interface, and double-click the network interface to read Network Status. Write down both MTU values. Synology's fix needs the two to match.

  5. Check free space. Synology says a volume needs at least 100 MB of free space to sync a shared folder replication task and 1 GB for a LUN replication task, on both the source and the destination servers.

  6. Select the task, click Action, then Edit, open the Partner Server tab and read the server name or IP address, whether encrypted connection is on, and the account. Click Configure to read the advanced connection settings, which hold the ports. Write them down and close the windows without saving.

  7. For the log reason "Reached the maximum number of snapshots", select the shared folder or LUN on the Snapshots page, click Settings, then Retention, and write down which of the three options is set. Synology lists Smart Retention policy, Numbers of latest snapshots to keep, and Keep all snapshots for.

  8. For the log reason "Not a destination server", read the task status in Snapshot Replication; Re-protect then starts under Recovery. Synology's re-protect page requires the status Failover to This Server or Failover to Destination Server, and requires that "The volume that contains the shared folder, LUN, or namespace has not been removed."

Example (illustrative): the Replication list shows Replication Failed, and the log says the sync failed "due to" Reached the maximum number of snapshots. The row to act on is the retention setting.

Fix

Use the section that matches the proof. Several end with a sync, which has its own warning at the end of this section.

Permission Error or Permission Error for Inbound Access

Write down the username shown on the Partner Server tab and the time.

Risk: the next change replaces the partner-server credentials stored in the task. If the new credentials are wrong the task fails with the same status again.

On the source server, go to Snapshot Replication, then Replication. Select the task, click Action, then Edit. On the Partner Server tab, re-enter the username and password.

To undo it: enter the username you wrote down and the password that belongs with it, from your own records.

Connection Failed or Inbound Connection Failed, and the same log reasons

Synology gives one list of actions for these statuses and for the log reasons Connection Failed, Connection for Data Syncing Failed and Credential Operation Failed. They are not password fixes. The first action is to ensure the MTU of the source server matches the destination server, and the checks above read both values.

Write down whether the firewall on each server is on and the rules it lists.

Risk: the next change turns a firewall off on both servers, which lets in network traffic the firewall would block. Synology's word is "Temporarily", so the firewall is switched back on once the test is done.

On DSM, go to Control Panel, then Security, then Firewall on each server and disable the firewall. On DSM Enterprise, check the firewalls configured in your network environment.

Leave the firewall off only until the test sync in Run the sync has finished, then set it back.

Risk: setting the firewall back turns it on again; a rule you did not write down is lost.

To undo it: after the test sync, set the firewall back to the state and rules you wrote down.

Next the connection settings. Write down the IP address, the ports and the encryption state shown on the Partner Server tab and in its advanced connection settings.

Risk: the next change edits how the task reaches the partner. A wrong IP address or port leaves the task failing.

On the source server, go to Snapshot Replication, then Replication. Select the task, click Action, then Edit. On the Partner Server tab, click Advanced connection settings, then Configure, and make sure the IP address and ports are properly configured. Synology also says to enable an encrypted connection.

To undo it: set the IP address, ports and encryption state back to the values you wrote down.

If the issue persists, Synology describes a further test, which is described here and not given as a step because it changes the address the task uses. Connect the source and destination servers directly with an Ethernet cable, read the destination's new IP address under Control Panel, Network, Network Interface, enter that address in the task, and sync. Synology says: "If this resolves the issue, it indicates that the problem may be caused by a device (e.g., a router, a switch, etc.)."

Relationship Broken

Synology's fix is one line: "Create the replication task again." Write down the old task's destination, shared folder or LUN, schedule and retention settings, and the time.

Risk: the next change creates a new task that starts replicating to the destination you enter. The destination volume needs the free space noted above.

On the source, go to Snapshot Replication, then Replication, open the Shared Folder or LUN tab and click Create. In the Create Replication Task wizard, choose Synology Snapshot Replication, choose a local or remote destination, enter the destination server's information and login credentials, and follow the wizard to finish.

Risk: deleting a task removes it and its schedule, and the old broken task is not brought back.

To undo it: select the new task, click Action, then Delete, and click Delete to confirm. The values you wrote down are what you enter if you create the task again.

Log reason: Reached the maximum number of snapshots

Synology's fix: "Set up a retention policy to automatically remove old snapshots." Write down the retention option now set, its values, the number of snapshots in the Snapshot List, and the time.

Disruptive step: the next change sets a rule that deletes snapshots automatically, and snapshots it deletes cannot be brought back. Synology says a snapshot marked Lock is protected from retention policies, immutable snapshots cannot be removed during their protection period, and the latest snapshot synced to the destination is preserved.

On the source, open the Snapshots page and select the shared folder or LUN. Click Settings, then Retention, and choose one of the three options: Smart Retention policy, Numbers of latest snapshots to keep, or Keep all snapshots for.

To undo it: set the retention option and values back to those you wrote down. Snapshots already deleted do not return.

Log reason: Not a destination server

Synology's fix is to re-protect the task, and says "This error usually occurs after a failover." Re-protect is not available for replication tasks of WriteOnce shared folders in Compliance mode; for those Synology says to create a new replication task.

Write down which server holds the data you want to keep, the size of the shared folder on each server and the time of the latest snapshot on each.

Risk: the next change overwrites data, and overwritten data cannot be brought back. Synology says the shared folder chosen in "Re-protect with the data from" is treated as the original data, and "the data on the other shared folder will be overwritten." Choosing the wrong server loses the newer data.

On the source or destination server, go to Snapshot Replication, then Recovery, then Shared Folder, signed in with an account in the administrators group. Choose the shared folder, click Action, then Re-protect. Choose the New source server, choose the server in Re-protect with the data from, and click Re-protect. Then enable the file protocol used on the new source server and connect the client to it.

To undo it: an overwrite cannot be reversed. Use the note you wrote down to restore the other side from your own backup.

LUN and namespace tasks have a separate procedure on the same page, which begins by disconnecting the iSCSI or NVMe-oF connection on the client.

Log reason: Others

Synology says to record the system logs of both the source and destination server and contact Synology Technical Support.

Run the sync

After a fix, Synology says to click Action, then Sync on the source. Write down the time and the task status first.

Disruptive step: the next action starts a sync that moves snapshots to the destination and uses bandwidth and destination space while it runs. Synology says to select Lock if the snapshot must be kept from automatic removal.

Select the task and click Action, then Sync, then OK.

To undo it: Synology says that during syncing you can click Action, then Stop. That stops the sync; snapshots already moved to the destination stay there.

Confirm the fix

  • The task status returns to a healthy value in Snapshot Replication, then Replication, and Info shows its Status, Statistics and Topology.
  • A new "Failed to sync replication" line stops appearing in Log after the next sync.
  • Synology says that when syncing completes the replicated shared folder or LUN on the destination is updated and the restoration information appears in Log.
  • The destination volume still has the free space listed above.

What to watch afterwards

  • Our own advice: a retention rule that matches how many snapshots the destination can hold.
  • Firewalls and routers between the servers. Synology says that if its direct-cable test resolves the fault, a router or a switch may be the cause.
  • The status of the task after any failover.
  • The volumes on both servers: Synology storage pool degraded.
  • Backups kept elsewhere: Synology Hyper Backup integrity check.

Risks and limits

These steps have not been run or lab-tested.

Re-protecting, a retention change and creating a task again each alter data or settings, and deleted snapshots and an overwrite cannot be brought back. Menu paths are DSM 7; DSM Enterprise differs for firewalls. Check Synology's current page for your DSM version before acting.

Sources