【问题标题】:Unable to start Zookeeper with 2 servers in the quorum无法在仲裁中使用 2 个服务器启动 Zookeeper
【发布时间】:2015-02-20 22:56:52
【问题描述】:

我正在尝试创建一个 Zookeeper 实例,其中有 2 个服务器在仲裁中运行。但是当我尝试启动第一个服务器实例时,出现以下异常:

2013-11-13 18:26:21,514 [myid:11111111111] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.lang.RuntimeException: My id 11111111111 not in the peer list
at org.apache.zookeeper.server.quorum.QuorumPeer.startLeaderElection(QuorumPeer.java:479)
at org.apache.zookeeper.server.quorum.QuorumPeer.start(QuorumPeer.java:411)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:151)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

谁能告诉我这里出了什么问题?

【问题讨论】:

  • java.lang.RuntimeException: 我的 id 11111111111 不在同行列表中
  • 根据documentationThe id must be unique within the ensemble and should have a value between 1 and 255.

标签: apache-zookeeper


【解决方案1】:

Zookeeper 真的不喜欢集群中有偶数个工人。话虽如此,问题可能是您的 myid 文件与您的 zoo.cfg 不匹配。 zoo.cfg 中列出的服务器必须与 myid 文件中的值集相对应。

【讨论】:

    猜你喜欢
    • 2015-07-06
    • 2015-08-15
    • 1970-01-01
    • 1970-01-01
    • 2017-10-30
    • 2015-11-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多