【问题标题】:How to get a Redis sentinel to forget a master?如何让 Redis 哨兵忘记主人?
【发布时间】:2020-09-30 17:39:29
【问题描述】:

我的 Redis 实例 - 主实例、从属实例(旧安装)和哨兵实例问题无穷无尽。部分问题是我的 Redis Masters 和 Slave 运行的是 windows 3.0.2 版本,我对此无能为力。我也无权访问运行哨兵的 unix 机器上的 root 或 redis 帐户。

我可以使用 redis-cli 连接到哨兵。

如何让我的一个哨兵忘记主人?我已经设法让它使用 monitor 命令监视第二个主控,但找不到让它忘记它的方法。

我没有权限,无法编辑配置文件。

我也找不到 cli 可用的哨兵命令列表。像 config get 这样的东西似乎不起作用。如果有人能指出一个链接,那就太棒了!

【问题讨论】:

    标签: redis redis-sentinel


    【解决方案1】:

    我在 sentinel.c 中找到了命令:

    "MASTERS -- Show a list of monitored masters and their state.",
    "MASTER <master-name> -- Show the state and info of the specified master.",
    "REPLICAS <master-name> -- Show a list of replicas for this master and their state.",
    "SENTINELS <master-name> -- Show a list of Sentinel instances for this master and their state.",
    "IS-MASTER-DOWN-BY-ADDR <ip> <port> <current-epoch> <runid> -- Check if the master specified by ip:port is down from current Sentinel's point of view.",
    "GET-MASTER-ADDR-BY-NAME <master-name> -- Return the ip and port number of the master with that name.",
    "RESET <pattern> -- Reset masters for specific master name matching this pattern.",
    "FAILOVER <master-name> -- Manually failover a master node without asking for agreement from other Sentinels",
    "PENDING-SCRIPTS -- Get pending scripts information.", 
    "MONITOR <name> <ip> <port> <quorum> -- Start monitoring a new master with the specified name, ip, port and quorum.",
    "FLUSHCONFIG -- Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.",
    "REMOVE <master-name> -- Remove master from Sentinel's monitor list.",
    "CKQUORUM <master-name> -- Check if the current Sentinel configuration is able to reach the quorum needed to failover a master "
    "and the majority needed to authorize the failover.",
    "SET <master-name> <option> <value> -- Set configuration paramters for certain masters.",
    "INFO-CACHE <master-name> -- Return last cached INFO output from masters and all its replicas.",
    "SIMULATE-FAILURE (crash-after-election|crash-after-promotion|help) -- Simulate a Sentinel crash.",
    "HELP -- Prints this help.",
    

    所以回答我的问题是:

    哨兵移除

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多