碰到的问题
1.sentinel无法检测出其他的sentinel
2.如果一个主节点宕机, sentinel不做任何处理,不会从slave中进行选举
解决方法:
增加密码
redis-server 设置了密码,如在 redis.conf 中设置了 :
requirepass 123456
在非主节点中需要加入 masterauth 123456
则在 sentinel 中也要设置访问密码,如在 sentinel.conf 中设置:
sentinel auth-pass mymaster 123456
此外需要注意的是如果修改配置文件需要重启进程(可以直接kill -9杀掉进程再重新打开)