Redis Sentinel Authentication

16.6k views Asked by At

I have 3 Servers with Redis and Sentinel Running. All instances have in the configuration

requirepass XXX
masterauth XXX

I can connect with redis-cli to the redis server but if I try to connect to the sentinel I can not authenticate.

root@ip-:/usr/lib/nagios/plugins# redis-cli -p 26379
127.0.0.1:26379> AUTH xxx
(error) ERR unknown command 'AUTH'
127.0.0.1:26379> 

If I use the same command but with the redis port it works.

Thanks best

1

There are 1 answers

3
maaw On BEST ANSWER

You have to setup auth for sentinels, too. I mean requirepass=<password> in sentinel.conf. More info on this here and here. Be careful, as not every client supports this setup.

Also, you need to set sentinel auth-pass <master-name> <password> in that file, in order for the sentinels to be able to administrate secured redis servers. (But I'm guessing you already did that).