天天看点

Operation category READ is not supported in state standby. hdfs改变standby状态为active

错误

原因

namenode

节点处于

standby

状态

解决方案

  1. 两种方式获取服务ID:

    a.

    hdfs

    50070

    端口的webUI页面 ——> Overview ——> NamenodeID

    b. 在hdfs-site.xml中:

<property>
    <name>dfs.ha.namenodes.nameservice1</name>
    <value>nn1,nn3</value>
  </property>
           
  1. 获取指定服务的服务状态:
hdfs  haadmin -getServiceState nn1
           
  1. 转变状态:
hdfs haadmin -transitionToActive --forcemanual  nn1
           

继续阅读