首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Redis 3.2 Sentinel不工作

Redis 3.2 Sentinel不工作
EN

Stack Overflow用户
提问于 2016-08-04 05:10:51
回答 1查看 1.3K关注 0票数 0

我的Redis Sentinel故障转移不工作,当主服务器完成时,不会进行握手,也不会发生故障转移;但是,sentinel会显示主服务器何时恢复正常状态或何时关闭。我的sentinel.conf文件内容如下:

代码语言:javascript
复制
# Process Info
port 26379
daemonize yes
pidfile "/var/run/redis/sentinel.pid"

# Log files
loglevel notice
logfile "/var/log/redis/sentinel.log"

# Master setup
sentinel monitor mymaster 10.0.2.94 6379 2
sentinel auth-pass mymaster 118
sentinel down-after-milliseconds mymaster 10000
sentinel failover-timeout mymaster 60000
sentinel parallel-syncs mymaster 1

# Slave setup
sentinel monitor redis2 10.0.3.56 6379 2
sentinel auth-pass redis2 118
sentinel down-after-milliseconds redis2 15000
sentinel failover-timeout redis2 65000
sentinel parallel-syncs redis2 1

Redis.conf文件是相当标准的,并且redis工作起来没有任何问题。

我真的很感谢大家对我的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-09 18:50:24

查看您发布的conf文件,它似乎设置错误您的群集名称mymasterredis2有变化,请尝试以下命令

代码语言:javascript
复制
# Process Info
port 26379
daemonize yes
pidfile "/var/run/redis/sentinel.pid"

# Log files
loglevel notice
logfile "/var/log/redis/sentinel.log"

# Master setup
sentinel monitor redis2 10.0.2.94 6379 2
sentinel auth-pass redis2 118
sentinel down-after-milliseconds redis2 10000
sentinel failover-timeout redis2 60000
sentinel parallel-syncs redis2 1

# Slave setup
sentinel monitor redis2 10.0.3.56 6379 2
sentinel auth-pass redis2 118
sentinel down-after-milliseconds redis2 15000
sentinel failover-timeout redis2 65000
sentinel parallel-syncs redis2 1

基本上clister的名字必须是相同的。实际上,你可以在每台服务器上使用相同的.conf文件,这样会更容易。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38753697

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档