zookeeper hadoop-ha znode错误导致ZKFailoverController无法启动

本文介绍了解决Ambari启动ZKFailoverController失败的问题,通过日志定位到Parent znodedoes not exist错误,并给出了使用hdfszkfc-formatZK命令初始化ZooKeeper的具体步骤。

Ambari启动ZKFailoverController失败了,输入tail -f -n 100 hadoop-hdfs-zkfc-master.log 

日志中显示:

org.apache.hadoop.ha.ZKFailoverController: Unable to start failover controller. Parent znode does not exist.
Run with -formatZK flag to initialize ZooKeeper.

按照提示,在失败的节点上输入:

hdfs zkfc -formatZK

重启zkfc就行了。


参考https://community.hortonworks.com/questions/50078/unable-to-start-zkfailovercontroller.html


25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:java.io.tmpdir=/tmp 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:java.compiler=<NA> 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:os.name=Linux 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:os.arch=amd64 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:os.version=3.10.0-1160.el7.x86_64 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:user.name=root 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:user.home=/root 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Client environment:user.dir=/usr/local/hadoop/sbin 25/12/02 16:37:59 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=abc:2181,bcd:2181,cde:2181 sessionTimeout=5000 watcher=org.apache.hadoop.ha.ActiveStandbyElector$WatcherWithClientRef@478190fc 25/12/02 16:37:59 INFO zookeeper.ClientCnxn: Opening socket connection to server bcd/192.168.177.131:2181. Will not attempt to authenticate using SASL (unknown error) 25/12/02 16:37:59 INFO zookeeper.ClientCnxn: Socket connection established to bcd/192.168.177.131:2181, initiating session 25/12/02 16:37:59 INFO zookeeper.ClientCnxn: Session establishment complete on server bcd/192.168.177.131:2181, sessionid = 0x2000023ebf90000, negotiated timeout = 5000 =============================================== The configured parent znode /hadoop-ha/ns already exists. Are you sure you want to clear all failover information from ZooKeeper? WARNING: Before proceeding, ensure that all HDFS services and failover controllers are stopped! =============================================== Proceed formatting /hadoop-ha/ns? (Y or N) 25/12/02 16:37:59 INFO ha.ActiveStandbyElector: Session connected. y 25/12/02 16:38:07 INFO ha.ActiveStandbyElector: Recursively deleting /hadoop-ha/ns from ZK... 25/12/02 16:38:07 INFO ha.ActiveStandbyElector: Successfully deleted /hadoop-ha/ns from ZK. 25/12/02 16:38:07 INFO ha.ActiveStandbyElector: Successfully created /hadoop-ha/ns in ZK. 25/12/02 16:38:07 INFO zookeeper.ZooKeeper: Session: 0x2000023ebf90000 closed 25/12/02 16:38:07 INFO zookeeper.ClientCnxn: EventThread shut down
最新发布
12-04
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值