shutdown Master but failover not working

37 views
Skip to first unread message

shin...@gmail.com

unread,
May 31, 2017, 3:37:38 AM5/31/17
to Redis DB
Hello,

i am trying to exec Redis failover test.

when below condition,
shutdown Master(Redis server) but failover not working.

-------------------------------
[condition]

#server1(Master)
Redis server
Redis sentinel 1 --> stopped
Redis sentinel 2 --> stopped

#server2(Slave)
Redis server
Redis sentinel 1
Redis sentinel 2

#server3(Slave)
Redis server
Redis sentinel 1
Redis sentinel 2
-------------------------------

quorum setting is "2".


sentinel logs as below.
24858:X 31 May 13:39:53.092 # +new-epoch 134
24858:X 31 May 13:39:53.092 # +try-failover master mymaster 172.25.89.97 6379
24858:X 31 May 13:39:53.094 # +vote-for-leader 71490a668cdf1ac0d0f53a387df4368652257a42 134
24858:X 31 May 13:39:53.097 # d082c1ad35c81615e6f38f56e14e1bdab4a65d37 voted for 71490a668cdf1ac0d0f53a387df4368652257a42 134
24858:X 31 May 13:39:53.097 # 41e5396cedd322da723fa0164b2fc46415488961 voted for 71490a668cdf1ac0d0f53a387df4368652257a42 134
24858:X 31 May 13:40:04.020 # -failover-abort-not-elected master mymaster 172.25.89.97 6379
24858:X 31 May 13:40:04.072 # Next failover delay: I will not start a failover before Wed May 31 13:45:54 2017

many times repeating above logs.

please tell me why failover not working.


by the way,
i server1's 2 sentinels started up,
failover had been started soon.

Regards,
shinmaise.

Aaron Shan

unread,
Jun 1, 2017, 1:32:32 AM6/1/17
to Redis DB
there is not enough information provided. For my experience, this happen when either of your slaves are "good slave". Maybe they are still synchronizing the master or the data is too old.

It happen to me sometimes that sentinel could not detect failure for some reason I don't know, and when it works like 5 minutes later, the slaves are no long "good slaves" to be elected as master.
Reply all
Reply to author
Forward
0 new messages