zoukankan      html  css  js  c++  java
  • Redis Sentinel 集群搭建常见注意事项

    我的配置:

    1个master,1个slave,3个sentinel

    搭建的过程网上已经有很多了,这里列几个重点关注:

    1. 修改sentinel.conf的protected-mode与redis.conf的一致,要么都为yes,要么都为no。若未配置好可能会在主从切换时出现 failover-abort-no-good-slave 的故障
    2. 修改sentinel.conf的bind为本地ip。
    3. 每个redis.conf中的密码最好一致,因为同步的时候,redis会根据redis.conf中配置的masterauth去连接远程master。
    4. 若配置文件sentinel.conf中有myid,确保每个文件的myid值全局唯一(与其他sentinel.conf文件的不相同),否则可能导致明明起了多个sentinel,通过info sentinel命令却只能查到1个sentinel实例。
    5. 若以上配置没问题,但仍然出现各种诡异问题,如failover-abort-no-good-slave及info sentinel命令查到的sentinels数量不正确,就得检查防火墙配置了。可以通过redis-cli远程连接redis及sentinel端口,看看是否可以连接上,而不会出现“No route to host”等连接故障
  • 相关阅读:
    shell test条件判断
    shell 变量
    shell 流程结构
    shell 正则表达式
    shell脚本常用参数
    snmp 简单的网络管理协议
    linux
    nmap
    git 基础操作
    linux 下 svn 更新代码
  • 原文地址:https://www.cnblogs.com/winstonet/p/9283805.html
Copyright © 2011-2022 走看看