redis 哨兵配置
redis 哨兵
port 7031
dir /opt/app/redis/redis-2.8.17/tmp
sentinel monitor mymaster 10.6.144.155 6379 1
sentinel down-after-milliseconds mymaster 5000
sentinel parallel-syncs mymaster 1
sentinel failover-timeout mymaster 15000
sentinel auth-pass mymaster 123456
redis.conf
在102的conf/redis.conf的配置文件配置为101的slave关系
slaveof 192.168.0.101 6379
masterauth master1
在101的conf/redis.conf的配置master的密码
requirepass master1
查看设置情况,使用如下命令
101
./redis-cli
auth master1
info replication
若发现配置没有问题,但是master_link_status一直是down,connected_slaves一直是0,
查找下,是不是三个ip之间不能拼通,如果能拼通,查看下端口是否能拼通,可以在windows上通过telnet
telnet 192.168.0.101 6379
如果发现不能拼通,修改下配置文件,将bind 127.0.0.1注释掉,重启服务,再试试.
相关推荐
王道革 2020-11-25
wangdonghello 2020-11-03
Langeldep 2020-11-16
chenhualong0 2020-11-16
聚合室 2020-11-16
koushr 2020-11-12
MRFENGG 2020-11-11
guoyanga 2020-11-10
fackyou00 2020-11-10
Orangesss 2020-11-03
dongCSDN 2020-10-31
rainandtear 2020-10-30
Quietboy 2020-10-30
liuyulong 2020-10-29
fansili 2020-10-29
温攀峰 2020-10-23
jackbon 2020-10-19
kaixinfelix 2020-10-04