zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Nauroth <cnaur...@hortonworks.com>
Subject Re: zookeeper for namenode doesn't elect active, when host is down
Date Thu, 21 May 2015 17:28:55 GMT

The HA implementations for NameNode and ResourceManager are slightly
different.  For the NameNode, there is a separate process called the
ZKFailoverController that owns the ZooKeeper session.  When that process
sees that it has obtained a lock through ZooKeeper, then it sends a
command to the NameNode on the same host to transition to active state.
For the ResourceManager, there is no separate failover controller process.
 Instead, the ResourceManager process directly runs the ZooKeeper client,
owns the ZooKeeper session, and handles its own failover semantics.

The symptoms that you described make it sound like perhaps one of the
ZKFailoverController processes is not running or is malfunctioning.  I
recommend starting the investigation there.  Full documentation of this
architecture and its configuration is available here:


This is more of an HDFS question than a ZooKeeper question, so for any
follow-up discussion, I recommend restarting the thread on

I hope this helps!

--Chris Nauroth

On 5/21/15, 6:30 AM, "skeletor@lissyara.su" <skeletor@lissyara.su> wrote:

>I have setup'ed hadoop HA-cluster with autofailoer on namenodes and
>resource manager by this manuals
>So, when i halt only hadoop daemon, zookeeper swithes to active NameNode
>and ResMan. But when i halt a whole server (with zookeeper member of
>quorum) switches only ResMan.
>I have tried many configurations.
>here zoo.cfg
>   <property>
>     <name>ha.zookeeper.quorum</name>
>     <value>name-node1:2181,name-node2:2181,data-node1:2181</value>
>   </property>
>   <property>
>     <name>yarn.resourcemanager.zk-address</name>
>   </property>
>When i halted whole host name-node1 at zookeeper's log i see next:
>2015-05-21 13:24:22,177 [myid:5] - WARN
>[RecvWorker:3:QuorumCnxManager$RecvWorker@780] - Connection broken for
>id 3, my id = 5, error =
>         at java.io.DataInputStream.readInt(DataInputStream.java:392)
>         at 
>2015-05-21 13:24:22,178 [myid:5] - WARN
>[RecvWorker:3:QuorumCnxManager$RecvWorker@783] - Interrupting SendWorker
>2015-05-21 13:24:22,179 [myid:5] - WARN
>[SendWorker:3:QuorumCnxManager$SendWorker@697] - Interrupted while
>waiting for message on queue
>         at 
>         at 
>         at 
>         at 
>         at 
>         at 
>2015-05-21 13:24:22,179 [myid:5] - WARN
>[SendWorker:3:QuorumCnxManager$SendWorker@706] - Send worker leaving
>When i halted whole host resource-manager at zookeeper's log i see next:
>2015-05-21 13:24:22,990 [myid:4] - INFO  [ProcessThread(sid:4
>cport:-1)::PrepRequestProcessor@645] - Got user-level KeeperException
>when processing sessionid:0x34d767b51ef0000 type:create cxid:0x9
>zxid:0x1c0000004e txntype:-1 reqpath:n/a Error
>Error:KeeperErrorCode = NodeExists for
>After this ResMan2 became an active.
>What i am doing wrong?

View raw message