解决启动hbase出现ERROR: Can‘t get master address from ZooKeeper; znode data == null
启动hbase正常,但是用list命令时报错:ERROR: Can’t get master address from ZooKeeper; znode data == nullHere is some help for this command:List all user tables in hbase. Optional regular expression parameter couldbe
启动hbase正常,但是用list命令时报错:
ERROR: Can’t get master address from ZooKeeper; znode data == null
Here is some help for this command:
List all user tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:
hbase> list
hbase> list ‘abc.’
hbase> list 'ns:abc.’
hbase> list ‘ns:.*’
先查看hbase的日志文件,出现如下错误:
2021-12-08 23:51:35,101 FATAL [hadoop01:16000.activeMasterManager] master.HMaster: Failed to become active master
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
解决:
①说明了与节点的active和standby有关,我的情况是三台高可用hadoop,其中主节点hadoop01是standby,hadoop02是active,但是还是会报错,我主动干预zookeeper选举,把hadoop01设置成active,hadoop02设置成standby,结果就成功了
主动干预zookeeper选举命令:
hdfs haadmin -transitionToStandby --forcemanual nn2
hdfs haadmin -transitionToActive --forcemanual nn1
②高可用hadoop core-site.xml配置的这一块
和hbase-site.xml不符合,因为当时我是在高可用配置前已经配置好hbase了,后期没有去改,所以得改过来
修改之后:
再把hadoop 集群的配置文件 core-site.xml 和 hdfs-site.xml 这两个配置文件复制到hbase的conf目录下
重新启动hadoop集群和hbase
更多推荐
所有评论(0)