How to fix ERR Can't SYNC while not connected in Redis

RedisINTERMEDIATEHIGHUpdated Dec 29, 2025· 239 views

This error occurs when a Redis replica attempts to synchronize with a master that is itself a replica but has lost its own master connection. Fixing it requires ensuring proper master configuration and network connectivity in your replication topology.

Quick fix

Fixes ERR Can't SYNC while not connected

redis-cli -h <master-host> -p <master-port> INFO replication
  1. Verify the master-replica connection status
  2. Ensure direct master connectivity from the failing replica
  3. Disconnect the replica from its previous master (if needed)
  4. Reconfigure the replica to sync from the correct master
redis — error
redis-cli -h <master-host> -p <master-port> INFO replication
ERR Can't SYNC while not connected

What this error means

In Redis replication, replicas sync data from a master node. This error specifically indicates that a replica is trying to execute a SYNC command against a node that is configured as a replica but is not currently connected to its own master. This creates a broken synchronization chain where data cannot flow properly. The replica cannot sync because the node it's trying to sync from is in an invalid state—it's a slave without an active connection to its master, making it unable to provide consistent data.

Typical symptoms

  • Replicas fail to sync with master and continuously retry SYNC commands
  • Log messages showing "Master does not support PSYNC or is in error state"
  • Replication lag increases indefinitely
  • Data inconsistency between nodes in a multi-tier replication setup
  • Sentinel failover or manual failover operations fail to complete

Common causes

  1. Master connection lost in chained replication topology (A → B → C) where B loses connection to A, preventing C from syncing with B
  2. Improper failover configuration where a promoted replica is not fully disconnected from its previous master
  3. Network connectivity issues between the replica and its configured master
  4. Redis version mismatch or replication protocol incompatibility
  5. Misconfigured slaveof/replicaof directive pointing to an invalid master

How to fix "ERR Can't SYNC while not connected"

1Verify the master-replica connection status

Check the replication status of all nodes using the INFO replication command:

bash
redis-cli -h <master-host> -p <master-port> INFO replication

Look for "role" field. The master should show "role:master" and replicas should show "role:slave" or "role:replica" with a connected master link. If "master_link_status:down", the replica has lost connection to its master.

2Ensure direct master connectivity from the failing replica

Verify network connectivity from the replica to its configured master:

bash
redis-cli -h <replica-host> -p <replica-port> ping
redis-cli -h <replica-host> -p <replica-port> CLIENT LIST | grep MASTER
netcat -zv <master-host> <master-port>

If the replica cannot reach the master, check firewall rules, security groups, DNS resolution, and network routing.

3Disconnect the replica from its previous master (if needed)

If you recently performed a failover and the replica is still trying to connect to a dead master, disconnect it first:

bash
redis-cli -h <replica-host> -p <replica-port> REPLICAOF NO ONE

Wait a few seconds, then verify it is now standalone:

bash
redis-cli -h <replica-host> -p <replica-port> INFO replication
4Reconfigure the replica to sync from the correct master

Once the replica is standalone, point it to the correct master:

bash
redis-cli -h <replica-host> -p <replica-port> REPLICAOF <new-master-host> <new-master-port>

Verify the connection is now established:

bash
redis-cli -h <replica-host> -p <replica-port> INFO replication

Look for "master_link_status:up" and "connected_slaves" on the master side.

5Check Redis logs for detailed sync errors

Examine the Redis server logs on both master and replica for the specific sync failure:

bash
redis-cli -h <host> -p <port> --latency-history
redis-cli -h <host> -p <port> --stat

For Docker containers:

bash
docker logs <container-id> | grep -i "sync\|repl\|connect"

Common issues: replication ID mismatches, insufficient backlog, or TLS/authentication failures.

6For chained replication, simplify the topology if possible

If using a multi-tier replication chain (A → B → C), consider flattening it so all replicas connect directly to the master:

Before:

bash
A (master)
└── B (replica of A)
    └── C (replica of B)

After:

bash
A (master)
├── B (replica of A)
└── C (replica of A)

This eliminates the single point of failure and the "not connected" error cascade.

Advanced notes

In Kubernetes environments using the redis-operator or bitnami/redis Helm chart, ensure the service endpoints are correctly configured and network policies allow pod-to-pod communication. When using Sentinel for automatic failover, verify that down-after-milliseconds and failover-timeout are properly tuned to avoid cascading failures during master elections. If you see this error during a failover, check that the SLAVEOF NO ONE command on the promoted node completes before replicas attempt to resync. For very large datasets, the RDB transfer itself can take considerable time—increase timeout values accordingly. Additionally, some older Redis versions had bugs in PSYNC negotiation; upgrade to Redis 6.0+ if possible.

Frequently asked questions

What does "ERR Can't SYNC while not connected" mean?
In Redis replication, replicas sync data from a master node. This error specifically indicates that a replica is trying to execute a SYNC command against a node that is configured as a replica but is not currently connected to its own master. This creates a broken synchronization chain where data cannot flow properly.
How do I fix "ERR Can't SYNC while not connected"?
This error occurs when a Redis replica attempts to synchronize with a master that is itself a replica but has lost its own master connection. Fixing it requires ensuring proper master configuration and network connectivity in your replication topology.
What causes "ERR Can't SYNC while not connected"?
Master connection lost in chained replication topology (A → B → C) where B loses connection to A, preventing C from syncing with B Improper failover configuration where a promoted replica is not fully disconnected from its previous master Network connectivity issues between the replica and its configured master
Is the "ERR Can't SYNC while not connected" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading