I set up redis-sentinel, 3 nodes, and get a strange situation. One of my physical server restart and sentinel change the master. But the master node role still is slave. I restart all nodes or remove - reinstall redis but sentinel still doesn't work. All node roles are slave!

Comment From: hwware

@heherockit Hello, thank you for reporting issue, but your description is a little bit blur here, may I ask you can you share what is the configuration of your system is? like 3 servers, server 1 master server 2 slave for server 1 etc ? then what is the configuration of you sentinel such as quorum value or election timeout through SENTINEL MONITOR command? Also which Redis and Sentinel version you are using? Thanks

Comment From: heherockit

Hi,

Here is my config:

protected-mode no port 6379

tcp-keepalive 300 daemonize yes supervised systemd pidfile "/var/run/redis/redis-server.pid" logfile "/var/log/redis/redis-server.log" databases 16

dir "/var/lib/redis"

Generated by CONFIG REWRITE

slaveof 192.168.1.95 6379

All are basic settings.

I uninstall / reinstall redis, create password, change IP but can not join sentinel again. Actually, a node will join and set role master, but after few seconds, it set back to slave.

I have a backup cluster with same settings and it works properly.

I guest my cluster was hacked but all nodes are local IP, I do create password and use new local IP, it still happens.

Thanks

Comment From: hwware

Hello @heherockit can you also share your sentinel config? and if possible, the log of master/slave and sentinel, thanks