环境:hadoop2.6+zookeeper2.4.5
4台服务器分别为:
yun01-nn-01
yun01-nn-02
yun01-dn-01
yun01-dn-02
本来是可以正常启动的,后来不知出了什么问题,再启动hadoop:
start-dfs.sh
执行上述命令后,jps查看,启动的进程中只有NameNode,DFSZKFailoverController 未启动,查看日志:
2016-04-28 08:44:16,767 INFOorg.apache.hadoop.ha.ActiveStandbyElector: Session connected. 2016-04-28 08:44:16,767FATAL org.apache.hadoop.ha.ZKFailoverController: Unable to start failovercontroller. Parent znode does not exist. Run with -formatZK flagto initialize ZooKeeper. 2016-04-28 08:44:16,774 INFOorg.apache.zookeeper.ClientCnxn: EventThread shut down 2016-04-28 08:44:16,776 INFOorg.apache.zookeeper.ZooKeeper: Session: 0x2543cd4c8450000 closed 按照日志描述,我重新格式化了zookeeper:./bin/ hdfs zkfc–formatZK 然后使用start-dfs.sh启动成功,什么情况下会要重新格式化zookeeper?
|