master节点状态为standby无法上传文件网页查看显示:
Operation category READ is not supported in state standby
解决方法:
# 查看namenode节点的HA状态
[root@master ~]# hdfs haadmin -getServiceState nn1
standby
[root@master ~]# hdfs haadmin -getServiceState nn2
active
# 修改nn2为standby状态
[root@master ~]# hdfs haadmin -transitionToStandby --forcemanual nn2
# 修改nn1为active状态
[root@master ~]# hdfs haadmin -transitionToActive --forcemanual nn1
然后在查看一下namenode节点的状态:
[root@master ~]# hdfs haadmin -getServiceState nn1
active
[root@master ~]# hdfs haadmin -getServiceState nn2
standby
完美解决!!!