zookeeper 的一个节点启动时候报错:
2011-02-10 15:16:24,128 - INFO [QuorumPeer:/0:0:0:0:0:0:0:0:2188:FastLeaderElection@683] - Notification time out: 60000
2011-02-10 15:16:24,128 - INFO [QuorumPeer:/0:0:0:0:0:0:0:0:2188:FastLeaderElection@689] - Notification: 2, 0, 1, 2, LOOKING, LOOKING, 2
2011-02-10 15:16:24,128 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (3, 2)
2011-02-10 15:16:24,129 - INFO [QuorumPeer:/0:0:0:0:0:0:0:0:2188:FastLeaderElection@799] - Notification: 9, 8589934592, 3, 2, LOOKING, FOLLOWING, 0
2011-02-10 15:16:24,129 - INFO [QuorumPeer:/0:0:0:0:0:0:0:0:2188:FastLeaderElection@799] - Notification: 9, 8589934592, 3, 2, LOOKING, FOLLOWING, 1
2011-02-10 15:16:24,129 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (4, 2)
2011-02-10 15:16:24,130 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (5, 2)
2011-02-10 15:16:24,131 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (6, 2)
2011-02-10 15:16:24,132 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (7, 2)
2011-02-10 15:16:24,132 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (8, 2)
2011-02-10 15:16:24,133 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connection: (9, 2)
2011-02-10 15:16:24,134 - INFO [WorkerSender Thread:QuorumCnxManager@162] - Have smaller server identifier, so dropping the connec
可能是zookeeper 的一个bug 。
狂google 就找到如下一个像样的说法:
Thanks for detailed assessment, Vishal. In Step b, the fact that the process believes it is the leader is not a problem, and it happens because we queue notification messages during leader election.
The real issue is that leader code is setting the last processed zxid to the first of the new epoch even before connecting to a quorum of followers. Because the leader code sets this value before connecting to a quorum of followers (Leader.java:281) and the follower code throws an IOException (Follower.java:73) if the leader epoch is smaller, we have that when the false leader drops leadership and becomes a follower, it finds a smaller epoch and kills itself.
I noticed that this follower check was not there before (not present in 3.0 branch), and it might have been introduced when we did the observer reorganization. For now I propose that we move line Leader.java:281 to Leader.java:470. It simply changes the point in which we set the last processed zxid to one in which we know that a quorum of followers supports the leader. I reasoned a bit about it and verified that tests pass.
A patch for the change I'm proposing is trivial, but a unit test will require some work, so I'd rather hear opinions first. Also, please note that this problem is not related to the topic of this jira, so we might consider working on a different jira from this point on.
可由于我用的是cloudera 的zookeeper 所以不能用其最近版(CDH3 没用zookeeper的最新版)
最后我的解决方法是:
重启系统。。。。
分享到:
相关推荐
NULL 博文链接:https://shift-alt-ctrl.iteye.com/blog/1859725
NULL 博文链接:https://xkorey.iteye.com/blog/2201301
server程序入口(启动类在zookeeper-server/src/main/java文件夹中,org.apache.zookeeper.server.quorum.QuorumPeerMain),program argument为conf/zoo.cfg,将conf/log4j.properties配置拷贝到zookeeper-server/...
java -classpath .:slf4j-api-1.7.2.jar:zookeeper-3.4.6.jar org.apache.zookeeper.server.LogFormatter /var/lib/zookeeper/version-2/log.1 ##window的bat批量方式 @echo off echo 查看zookeeper日志: set /...
完成Zookeeper的完全分布模式的安装 Zookeeper服务能够正常启动和连接 Zookeeper控制台能够正常进入 Zookeeper控制台命令能够正常使用 二、实验目的 Zookeeper的完全分布模式的安装和验证 三、软件版本 选用...
apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper-3.7.1 apache-zookeeper...
zookeeper配置文件.zip
zookeeper 3.6.3 源码
3.3.0版本引入的 3.3.0版本引入的 3.3.0版本引入的 3.3.0版本引入的 3.3.0版本引入的 3.3.0版本引入的
zookeeper集群需要奇数台机器,本示例使用3台机器,机器名称分别为server1、server2、server3。 本集群是centos6版本。 本示例是在已经安装完jdk8的环境中进行操作的,如果没有安装jdk,则需要提前安装jdk
解压zookeeper-3.5.3-beta.rar,安装完成后,进入到bin目录,并且启动zkServer.cmd,这个脚本中会启动一个java进程: (注:需要先启动zookeeper后,后续dubbo demo代码运行才能使用zookeeper注册中心的功能)
zookeeper可视化工具
zookeeper linux 搭建流程,zookeeper linux 搭建流程zookeeper linux 搭建流程zookeeper linux 搭建流程。
1.0 zookeeper 是什么? 1.1 zookeeper 提供了什么? 1.2 zookeeper 文件系统 ...2.4 zk 集群下 server 工作状态 2.5 zk 是如何选举 Leader 的? 2.6 zk 同步流程 2.7 分布式通知和协调 2.8 zk 的 session 机制
zookeeper-3.4.6 解压后可直接运行 bin/zkServer.cmd 来启动
官方离线安装包,亲测可用
(在/data/zookeeper/目录下touch myid,vi myid 插入对应的server.id) 5、将整个 zookeeper-3.4.6 scp到其他机器上 6、启动zookeeper 在每台机器上运行 bin/zkServer.sh start 查看运行状态:bin/zkServer.sh status ...
【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】zookeeper面试题【BAT必备】...
dubbo2.6.0 + Zookeeper3.4.9 + Zookeeper3.8.0 + Zookeeper3.7.1
ZooKeeper 未授权访问【原理扫描】,zookeeper安全漏洞修复方法和操作步骤