Valkey nodes fail to synchronize with the following error in replica logs:
* PRIMARY <-> REPLICA sync started
* Connecting to PRIMARY ###.##.###.#:0 # Error condition on socket for SYNC: Connection refused
While it is possible to use non-TLS, TLS, or a mix of the two in Valkey, this issue can occur when ports are not configured correctly in the valkey.conf file:
port 0The above configuration disables the non-TLS port but lacked the configuration for an active TLS port, so Valkey cannot establish synchronization resulting in an immediate connection refusal.
Ensure ports are explicitly set to a valid listener port:
port 6379
tls-port 0port 0
tls-port 6379tls-replication yesport 6379
tls-port 6380