根据网上的解决方案:
1.我核对了sentinel.config和redis.config bind 绑定的端口。
2.三台redis masterauth都设置了密码
3.sentinel.config 的sentinel monitor mymaster 和sentinel auth-pass mymaster 也没有错。
但在我测试主从复制的时候,发现主从主机无法相连,我在网上找的解决方案的关闭了master主机所在的防火墙。
现在master下线了,需要选举新的master,需要关闭新master所在主机的防火墙。
systemctl stop firewalld