redis主从部署使用sentinel做监控 为什么failover 无法切换到新的master上去?

扁豆焖面先生 发布于 2015/06/12 14:31
阅读 2K+
收藏 0

如题 下面是redis sentinel日志


29114:X 12 Jun 14:04:20.607 # Sentinel runid is 043891c936a959aec45f8e66076f23a268fdb3e4
29114:X 12 Jun 14:04:20.607 # +monitor master mymaster 10.10.0.5 6379 quorum 2
29114:X 12 Jun 14:04:20.607 * +slave slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:20.608 * +slave slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:26.833 * +sentinel sentinel 10.10.0.6:26379 10.10.0.6 26379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:04:29.203 * +sentinel sentinel 10.10.0.7:26379 10.10.0.7 26379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:07:45.950 # +sdown slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:08:02.423 * +reboot slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:08:02.480 # -sdown slave 10.10.0.6:6379 10.10.0.6 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.859 # +sdown master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.927 # +odown master mymaster 10.10.0.5 6379 #quorum 2/2
29114:X 12 Jun 14:22:42.927 # +new-epoch 1
29114:X 12 Jun 14:22:42.927 # +try-failover master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.928 # +vote-for-leader 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.930 # 10.10.0.6:26379 voted for 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.931 # 10.10.0.7:26379 voted for 043891c936a959aec45f8e66076f23a268fdb3e4 1
29114:X 12 Jun 14:22:42.999 # +elected-leader master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:42.999 # +failover-state-select-slave master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.100 # +selected-slave slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.100 * +failover-state-send-slaveof-noone slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:22:43.156 * +failover-state-wait-promotion slave 10.10.0.7:6379 10.10.0.7 6379 @ mymaster 10.10.0.5 6379
29114:X 12 Jun 14:25:43.170 # -failover-abort-slave-timeout master mymaster 10.10.0.5 6379
29114:X 12 Jun 14:25:43.232 # Next failover delay: I will not start a failover before Fri Jun 12 14:28:43 2015



redis 部署信息:

10.10.0.5:6379 master

10.10.0.6:6379

10.10.0.7:6379

------------------------------------

10.10.0.5:26379 

10.10.0.6:26379

10.10.0.7:26379

sentinel.conf配置如下


###############################################

# sentinel

port 26379
daemonize yes
logfile "/usr/local/redis/log/sentinel.log"

sentinel monitor mymaster 10.10.0.5 6379 2
sentinel down-after-milliseconds mymaster 5000
sentinel failover-timeout mymaster 180000
sentinel parallel-syncs mymaster 1
###############################################

加载中
0
扁豆焖面先生
扁豆焖面先生
啥都不说了  都是泪啊 。。。
可能是我rpm包打包问题,从redis源码编译安装的redis 主从启动后测试没有问题。
看来还有待研究啊。
返回顶部
顶部