启动hdfs,两个namenode节点都是Standby

作者 时间
刘权 2016-08-30

问题详情

使用命令:start-dfs.sh启动集群后发现,两个节点都是Standby

解决尝试

  1. 将hdfs重启 结果:不管用
  2. 在网络上查找资料,说可以使用命令: 结果:中断尝试
    hdfs haadmin -transitionToActive --forcemanual nn1
    但是,执行后出现下列警告就不敢继续尝试了,怕出问题:
You have specified the forcemanual flag. This flag is dangerous, as it can induce a split-brain scenario that WILL CORRUPT your HDFS namespace, possibly irrecoverably.

It is recommended not to use this flag, but instead to shut down the cluster and disable automatic failover if you prefer to manually manage your HA state.

You may abort safely by answering 'n' or hitting ^C now.

Are you sure you want to continue? (Y or N)

3.怀疑是zookeeper的问题,导致zkfc不能自动切换,停止hdsf后,重启zookeeper 集群,再启动hdfs 结果:成功

你可能感兴趣的:(启动hdfs,两个namenode节点都是Standby)