[server@server1 hadoop-2.7.2]$ bin/hdfs haadmin -transitionToActive nn1
Automatic failover is enabled for NameNode at server2/192.168.31.11:9000
Refusing to manually manage HA state, since it may cause
a split-brain scenario or other incorrect state.
If you are very sure you know what you are doing, please
specify the --forcemanual flag.
问题描述:bin/hdfs haadmin -transitionToActive nn1失效
解决:
[server@server1 hadoop-2.7.2]$ sbin/hadoop-daemon.sh start zkfc
根本原因:
core-site.xml中配置了zookeeper托管,由zookeeper决定active
<property>
<name>ha.zookeeper.quorum</name>
<value>server1:2181,server2:2181,server3:2181</value>
</property>
先在哪台机器启动,哪个机器的NameNode就是Active NameNode