简体   繁体   中英

Redis failover fails after hosts reboot

I have a small cluster of redis machines, 3 hosts with sentinels on them, one master and 2 slaves. Each time when we are doing any patching and rebooting machines, some of instances are not getting up after the reboot and sentinel shows their status as sdown In Sentinel log this msg keeps popping up:

9932:X 18 Jul 13:46:47.357 # Next failover delay: I will not start a failover before Wed Jul 18 13:52:47 2018
9932:X 18 Jul 13:46:47.485 # +new-epoch 9602
9932:X 18 Jul 13:46:47.485 # +try-failover master Redis 10.208.202.112 6204
9932:X 18 Jul 13:46:47.487 # +vote-for-leader eb84f5a615bc02d9de4674dd33136fcde3f318dd 9602
9932:X 18 Jul 13:46:47.491 # daf5bf045ca5733de9fdd7f0206aa225d993c100 voted for eb84f5a615bc02d9de4674dd33136fcde3f318dd 9602
9932:X 18 Jul 13:46:47.492 # 4009be0fbc29c385eb68a6492c8c94ce1b61e31b voted for eb84f5a615bc02d9de4674dd33136fcde3f318dd 9602
9932:X 18 Jul 13:46:47.559 # +elected-leader master Redis 10.208.202.102 6204
9932:X 18 Jul 13:46:47.559 # +failover-state-select-slave master Redis 10.208.202.112 6204
9932:X 18 Jul 13:46:47.630 # -failover-abort-no-good-slave master Redis 10.208.202.112 6204

And Sentinel is unable to select any master after reboot, and this msg keeps coming up again and again, but all the instances are up and running. Sentinels are on the same machines as redis slaves and master. I'm rebooting redis isntances and sentinels on all machines after issue appears and then everything gets back to normal. Does anyone know what can I do to make it work properly after reboot? When I'm doing normal failover, eg. shutting down master master it works fine, new master get's ellected and everything runs smooth. I don't even exactly care on which host the master gonna be, it can do a failover anytime it wants, I just need it to work after the machine reboot.

看起来原因是我没有将masterauth参数放在主配置中,只是requirepass,似乎主配置同时需要两者。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM