1. 程式人生 > >hadoop叢集-zk的leader上執行bin/hdfs zkfc –formatZK錯誤

hadoop叢集-zk的leader上執行bin/hdfs zkfc –formatZK錯誤

前提:hadoop叢集安裝

在zk的leader上執行 :bin/hdfs zkfc –formatZK。出現錯誤:

解決辦法:手動敲擊上命令。bin/hdfs zkfc -formatZK (可能的問題是複製的空格或者 - 不一樣)


錯誤的內容:

18/07/14 23:14:40 INFO zookeeper.ZooKeeper: Session: 0x264993282950000 closed
18/07/14 23:14:40 WARN ha.ActiveStandbyElector: Ignoring stale result from old client with sessionId 0x264993282950000
18/07/14 23:14:40 INFO zookeeper.ClientCnxn: EventThread shut down
18/07/14 23:14:40 FATAL tools.DFSZKFailoverController: Got a fatal error, exiting now
org.apache.hadoop.HadoopIllegalArgumentException: Bad argument: –formatZK
        at org.apache.hadoop.ha.ZKFailoverController.badArg(ZKFailoverController.java:251)
        at org.apache.hadoop.ha.ZKFailoverController.doRun(ZKFailoverController.java:214)
        at org.apache.hadoop.ha.ZKFailoverController.access$000(ZKFailoverController.java:61)
        at org.apache.hadoop.ha.ZKFailoverController$1.run(ZKFailoverController.java:172)
        at org.apache.hadoop.ha.ZKFailoverController$1.run(ZKFailoverController.java:168)
        at org.apache.hadoop.security.SecurityUtil.doAsLoginUserOrFatal(SecurityUtil.java:415)
        at org.apache.hadoop.ha.ZKFailoverController.run(ZKFailoverController.java:168)

        at org.apache.hadoop.hdfs.tools.DFSZKFailoverController.main(DFSZKFailoverController.java:181)