首页 > 数据库 > redis > 正文

redis 搭建sentinel 无法主从自动切换 一直卡在-sdown sentinel
2017-02-16 18:31:17 点击:

今天 搭建redis sentinel 一直卡在-sdown sentinel ,无法主从自动切换。配置如下:port 26379daemonize yeslogfile " home redis
今天 搭建redis sentinel 一直卡在-sdown sentinel ,无法主从自动切换。
配置如下:

port 26379 
daemonize yes
logfile "/home/redis/logs/sentinel.log" 
sentinel announce-ip 192.168.0.201                       
sentinel monitor mymaster 192.168.0.201 6379 2 
sentinel auth-pass mymaster Redis@jujinziben
sentinel down-after-milliseconds mymaster 15000 
sentinel failover-timeout mymaster 900000
sentinel can-failover mymaster yes
sentinel parallel-syncs mymaster 1


结果启动后一直卡在那边不动:


后来了解到sentinel的保护模式,改成如下:

port 26379 
daemonize yes
protected-mode no
logfile "/home/redis/logs/sentinel.log" 
sentinel announce-ip 192.168.0.201                       
sentinel monitor mymaster 192.168.0.201 6379 2 
sentinel auth-pass mymaster Redis@jujinziben
sentinel down-after-milliseconds mymaster 15000 
sentinel failover-timeout mymaster 900000
sentinel can-failover mymaster yes
sentinel parallel-syncs mymaster 1


关掉保护模式后重新启动哨兵正常。



相关热词搜索:redis -sdown sentinel

上一篇:redis报错 [ERR] Node 192.168.0.201:7001 is not empty. Either the node already
下一篇:redis快照关闭导致不能持久化的问题