【问题标题】:Redis Sentinel output in conf fileconf文件中的Redis Sentinel输出
【发布时间】:2015-07-07 04:01:59
【问题描述】:

我正在测试 Redis Sentinel 的故障转移能力。它起作用了,Sentinel 在 conf 文件中添加了一些行。它自动发现了其他哨兵和从属副本,但它添加了一些奇怪的 id。

谁能告诉我这些 id 代表什么?由于它们紧随 known-sentinel,我认为它们是那些哨兵的 id,但我不能确定。

# Generated by CONFIG REWRITE
sentinel known-slave redis_master 127.0.0.1 6379
sentinel known-slave redis_master 127.0.0.1 6381
sentinel known-sentinel redis_master 127.0.0.1 26380
26f81b692201f11f0f16747b007da9d4f079d9d3  # this
sentinel known-sentinel redis_master 127.0.0.1 26381
0b613c6146bbf261f08c1b13f1d1b2dbc2f99413 # and this?

【问题讨论】:

    标签: redis redis-sentinel


    【解决方案1】:

    是哨兵的run_id。记住 sentinel 是一个特殊的 redis 实例。登录哨兵并使用“信息服务器”查看其信息,其中包括 run_id。例如

    redis-cli -h sentinel_host -p sentinel_port
    info server
    

    如果你有多个哨兵,你可以使用

    sentinel sentinels mymaster(or redis_master in your situation)
    

    列出所有其他哨兵的信息。

    【讨论】:

      猜你喜欢
      • 2015-07-16
      • 2015-11-12
      • 1970-01-01
      • 2021-05-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-04-21
      • 1970-01-01
      相关资源
      最近更新 更多