如何让Redis哨兵忘记大师?

时间:2020-09-30 08:56:00

标签: redis redis-sentinel

我的Redis实例没有任何问题-主服务器,从服务器(旧安装)和哨兵。问题的部分原因是我的Redis Masters和Slave运行的是Windows 3.0.2版本,我无能为力。我也无法访问运行哨兵的Unix框中的root或redis帐户。

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

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

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

我也找不到cli可用的哨兵命令列表。诸如config get之类的东西似乎不起作用。如果有人可以指向我指向一个很棒的链接!

1 个答案:

答案 0 :(得分:0)

我在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.",

所以回答我的问题是:

前哨删除