Score:1

Redis Sentinel cannot connect to Master that is using password - Redis 6.2 (dockerized)

ru flag

I have dockerized images of redis (as official dockerhub guides when using custom redis.conf) and custom image (based on alpine image see here: https://pastebin.com/9WsMk1JC ) of sentinel (also with custom sentinel.conf).

In redis.conf, those three parameters was added (rest stays as default conf file):

masterauth password
masteruser default
requirepass password

In sentinel.conf, because of separation of redis instance (other containers) and sentinel is set up to boot up with non existing master on localhost. I've added parameters to perform auth on master. So config file have two additional parameters (rest stays as default conf file):

sentinel auth-pass mymaster password
sentinel auth-user mymaster default

After redis container is booted and ready for connections I start sentinel image, when it's done I connect to redis CLI on sentinel port and switch master by hand:

redis-cli -p 26379 sentinel remove mymaster && redis-cli -p 26379 sentinel monitor mymaster <redis container ip> 6379 2

sentinel's CLI returns OK two times but after a while it prints out that master is down. And it stays in this status forever.

Connectivity between containers tested via telnet and ping - OK.

My guess is that redis sentinel cannot connect to master - because of password.

Why?

  1. Replicas of redis container - making couple of image copies running and joining them in MASTER-SLAVE via CLI works like a charm. Containers can talk to each other using password from redis.conf.
  2. Before introducing passwords to redis contianers, sentinels could connect and perform successful failovers.
  3. Worked on Openshift without password setup.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.