Installed packages on ubuntu 22.04 redis-server and redis-sentinel. The cluster is set up, everything is fine, But the problem with the work of sentinel, The problem is that when the master node is turned off, the role of the master passes to the slave, but if the failed node returns to the cluster but does not become the slave node again Please help me for how many days I have been suffering
- 192.168.223.60 master
- 192.168.223.61 slave1
- 192.168.223.62 slave2
Sentinel Config master master node
bind 192.168.223.60 127.0.0.1
port 5000
daemonize no
pidfile “/var/run/sentinel/redis-sentinel.pid”
logfile “/var/log/redis/redis-sentinel.log”
dir “/var/lib/redis”
sentinel myid dea827ed53af8d12f43604cba4d3c7d1666f6209
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster 192.168.223.60 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 60000
sentinel auth-pass mymaster Az123456
sentinel config-epoch mymaster 0
protected-mode no
user default on nopass ~* +@all
sentinel leader-epoch mymaster 0
sentinel known-replica mymaster 192.168.223.61 6379
sentinel known-replica mymaster 192.168.223.62 6379
sentinel current-epoch 0
sentinel Config slave1 node
bind 192.168.223.61 127.0.0.1
port 5000
daemonize no
pidfile “/var/run/sentinel/redis-sentinel.pid”
logfile “/var/log/redis/redis-sentinel.log”
dir “/var/lib/redis”
sentinel myid dea827ed53af8d12f43604cba4d3c7d1666f6209
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster 192.168.223.60 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 60000
sentinel auth-pass mymaster Az123456
sentinel config-epoch mymaster 0
protected-mode no
user default on nopass ~* +@all
sentinel leader-epoch mymaster 0
sentinel known-replica mymaster 192.168.223.62 6379
sentinel known-replica mymaster 192.168.223.61 6379
sentinel current-epoch 0
Sentinel Config slave2 node
bind 192.168.223.61 127.0.0.1
port 5000
daemonize no
pidfile “/var/run/sentinel/redis-sentinel.pid”
logfile “/var/log/redis/redis-sentinel.log”
dir “/var/lib/redis”
sentinel myid dea827ed53af8d12f43604cba4d3c7d1666f6209
sentinel deny-scripts-reconfig yes
sentinel monitor mymaster 192.168.223.60 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 60000
sentinel auth-pass mymaster Az123456
sentinel config-epoch mymaster 0
protected-mode no
user default on nopass ~* +@all
sentinel leader-epoch mymaster 0
sentinel known-replica mymaster 192.168.223.62 6379
sentinel known-replica mymaster 192.168.223.61 6379