I am trying to setup a simple redis-sentinel
, and configure it to failover the master to one of its slaves.
I Set up 4 VMs (using virtualbox
) with redis installed on each of them. I have a master machine and two slaves. the last machine is the sentinel.
The master and the slaves have a default configuration, except I changed the bind address to bind 0.0.0.0
, and slaves have the slaveof <master-ip> 6379
line.
In the sentinel, I followed the basic tutorial and put in the following settings:
sentinel monitor mymaster <master-ip> 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 6000
sentinel parallel-syncs mymaster 1
The problem is that when I shutdown the master, the sentinel does not promote any slave instead.
Here are the sentinels logs:
1922:X 13 Jun 14:03:53.446 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
1922:X 13 Jun 14:03:53.446 # Sentinel ID is dc901c767178ddf8f569c4a17b79df2938342ede
1922:X 13 Jun 14:03:53.446 # +monitor master mymaster <master-ip> 6379 quorum 2
1922:X 13 Jun 14:04:04.595 # +sdown master mymaster <master-ip> 6379
What am I doing wrong?