1

I am using one master and slave conf files. Master.conf is usual configuration with:

bind 0.0.0.0
port 6379
requirepass mypswd

Ans slave.conf has These:

bind 0.0.0.0
port 6380
slaveof master 6379
masterauth mypswd

And i have one sentinel.conf file:

port 26379
dir "/tmp"
sentinel monitor mymaster 127.0.0.1 6379 1
sentinel down-after-milliseconds mymaster 20000
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 180000
sentinel auth-pass mymaster mypswd

And am using docker to run the instances:

I have created one Network in container for this:

Mater, slave and sentinel works fine. Sentinel command in docker is:

docker run --volume path-to/sentinel.conf:/usr/local/etc/redis/sentinel.conf -p 26379:26379 --name sentinel-1 --network redis-example redis:4 redis-sentinel /usr/local/etc/redis/sentinel.conf --sentinel

And also Failover happens when master stops.

But now if i cvhange the Quorum to 2, and use the same command it doesnt work: It just Shows:

+monitor master mymaster 127.0.0.1 6379 quorum 2
+sdown master mymaster 127.0.0.1 6379

I also tried having two different files like sentinel-2.conf and sentinel-3.conf and changed only ports to be 6380 and 6381 respectively. And commands were changed to:

docker run --volume pathto/sentinel-2.conf:/usr/local/etc/redis/sentinel.conf -p 26380:26379 --name 2fa-sentinel-2 --network redis-example   redis:4 redis-sentinel /usr/local/etc/redis/sentinel.conf

But still always Shows

+sdown master mymaster 127.0.0.1 6379

what am i doing wrong?

Thanks

pgman
  • 493
  • 3
  • 12
  • 21

0 Answers0