0

A redis cluster with one master node and two replica nodes. There are three sentinels to monitor the master node. sentinel config is follow:

protected-mode no
bind 0.0.0.0
port 26380
daemonize yes
appendonly yes
pidfile "/var/run/sentinel.pid"
logfile "/data/log/redis/sentinel.log"

dir "/data"
sentinel deny-scripts-reconfig yes
sentinel monitor local-master *.*.*.* 16379 2

sentinel down-after-milliseconds local-master 3000
sentinel auth-pass local-master ***

when the sentinels start one by one, "slaves" normally increases to 3.

127.0.0.1:26380> info sentinel
# Sentinel
sentinel_masters:1
sentinel_tilt:0
sentinel_tilt_since_seconds:-1
sentinel_running_scripts:0
sentinel_scripts_queue_length:0
sentinel_simulate_failure_flags:0
master0:name=local-master,status=ok,address=*.*.*.*:16379,slaves=2,sentinels=3

When I shutdown one sentinels, "+sdown sentinel" in sentinel log shows that this action. However, the "slaves" doesn't decrease, it remains at 3. enter image description here

It's same for shutting down replica node. Why? Could anyone help me find the problem?

"sentinels" and "slaves" info can be normally decrease when shutting down.

ll hitsz
  • 1
  • 1

0 Answers0