The problem:
When I learning to use redis-sentinel to set up redis servers for high availability, the redis-sentinel can't connect to the redis server and shows the master is sdown
Then I changed the log level of redis server and checked the logs:
1696:M 02 Apr 2026 01:09:47.529 - Accepted 127.0.0.1:43814
1696:M 02 Apr 2026 01:09:47.530 - Client closed connection id=5864 addr=127.0.0.1:43814 laddr=127.0.0.1:6379 fd=27 name= age=0 idle=0 flags=A db=0 sub=0 psub=0 ssub=0 multi=-1 watch=0 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=38144 events=r cmd=subscribe user=default redir=-1 resp=2 lib-name= lib-ver= io-thread=0 tot-net-in=143 tot-net-out=132 tot-cmds=1
And I checked the log again after I add the auth-user option to the sentinel instance manually, then the user value in the log changed to the correct user and the sentinel can connect to the redis server (I disabled the default user on redis server and trying to use acl users)
I want to know why the sentinel doesn't read the auth-user in the config file on launching but I can set it manually
About environment:
OS: Rocky Linux 9.6 (in virtual box)
redis version: 8.6.2 (download from the repository that the documentation on redis website provides)
The config file of redis-sentinel:
protected-mode no
port 26379
daemonize yes
pidfile "/var/run/redis-sentinel.pid"
loglevel notice
logfile "/var/log/redis/redis-sentinel.log"
dir "/var/lib/redis"
sentinel monitor mymaster 127.0.0.1 6379 2
sentinel auth-user mymaster admin
sentinel auth-pass mymaster password
acllog-max-len 128
sentinel deny-scripts-reconfig yes
sentinel resolve-hostnames no
sentinel announce-hostnames no
supervised auto
latency-tracking-info-percentiles 50 99 99.9
user default on nopass sanitize-payload ~* &* +@all
The user configs of redis server:
user admin +@all ~* on >password
user default on
Other info:
The user can be authenticated correctly
I tried to rename the original config file and make a new config file with the configs above but the problem doesn't solved