Hi,
I get following error when I try to force a failover:
(error) NOGOODSLAVE No suitable replica to promote
I have following setup:
- 1x Redis Master
- 2x Redis Replica
- 3x Redis Sentinel
Sentinel reports status "ok"
master0:name=mymaster,status=ok,address=xxx.xxx.xxx.xxx:6379,slaves=2,sentinels=3
I can also see that the sync was successful on the replica in the logs:
31497:S 12 Apr 2021 13:03:05.164 * Connecting to MASTER xxx.xxx.xxx.xxx:6379
31497:S 12 Apr 2021 13:03:05.164 * MASTER <-> REPLICA sync started
31497:S 12 Apr 2021 13:03:05.164 * Non blocking connect for SYNC fired the event.
31497:S 12 Apr 2021 13:03:05.165 * Master replied to PING, replication can continue...
31497:S 12 Apr 2021 13:03:05.165 * Trying a partial resynchronization (request xxxxxx:1376629081).
31497:S 12 Apr 2021 13:03:05.166 * Successful partial resynchronization with master.
31497:S 12 Apr 2021 13:03:05.166 * MASTER <-> REPLICA sync: Master accepted a Partial Resynchronization.
Also the state is online (info replication)
slave0:ip=xxx.xxx.xxx.xxx,port=6379,state=online,offset=1407160366,lag=0
slave1:ip=xxx.xxx.xxx.xxx,port=6379,state=online,offset=1407167545,lag=0
What I saw is that both replicas have the flag slave,disconnected when I call SENTINEL replicas mymaster
I do not see any errors in the logs.
Where can there be a problem? Did I miss something?
Thank you
Michi
Comment From: michilehr
Fixed it with a workaround.
The replicas had following config:
user default on sanitize-payload #XXXXXXXXXXXX ~* +@all
With this config, the default user on the replica was not allowed to subscribe to any channel so no connection message was received.
Just added the pattern &* for allchannels (see https://redis.io/topics/acl#acl-rules):
user default on sanitize-payload #XXXXXXXXXXXX ~* &* +@all
Like @itamarhaber explained in the Google Groups, the ACL Pub/Sub is a new thing in v6.2. So this error affects v6.2.0 and v6.2.1 after upgrading and should be fixed in v6.2.2 .
Thanks for the clarification and your good work @itamarhaber.