hbase ERROR: Can't get master address from ZooKeeper; znode data == null

张映 发表于 2019-10-14

分类目录: hadoop/spark/scala

标签:, ,

hbase一直好好的,突然hbase shell报以下错误

hbase(main):001:0> list
TABLE

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:.*'

1,在看这篇文章前,最好看一下以下文章

centos7 hadoop 集群 安装配置

zookeeper hadoop 集群 安装配置

centos7 hadoop2.7.7 hbase1.4安装配置详解

2,原因分析

[root@bigserver1 bin]# jps
16627 HRegionServer
6517 ResourceManager
17496 Jps
14905 QuorumPeerMain
5997 NameNode
16494 HMaster     //该进程挂掉
6207 JournalNode
6399 DFSZKFailoverController

stop-hbase.sh,start-hbase.sh重启后,bigserver1中的HMaster起来了,可过一会又挂掉了

# vim /bigdata/hbase/logs/hbase-root-master-bigserver1.log  //发现以下错误

2019-10-14 17:53:19,260 FATAL [bigserver1:16000.activeMasterManager] master.HMaster: Unhandled exception. Starting shutdown.
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
 at org.apache.hadoop.hdfs.server.namenode.ha.StandbyState.checkOperation(StandbyState.java:87)
 at org.apache.hadoop.hdfs.server.namenode.NameNode$NameNodeHAContext.checkOperation(NameNode.java:1802)
bigserver1 standby

bigserver1 standby

果然standby了,hadoop做了ha,二个调度节点会切换的。但是也不会影响hbase,估计是哪里配置错了。

# vim /bigdata/hbase/conf/hbase-site.xml 

<property>
 <name>hbase.rootdir</name>
 <value>hdfs://bigserver1:9000/hbase</value> //配置错误,不应当指定单个节点,而要指到ha集群
</property>

3,解决问题

# vim /bigdata/hbase/conf/hbase-site.xml  

<property>
 <name>hbase.rootdir</name>
 <value>hdfs://bigdata1/hbase</value>      //修改完重启hbase
</property>

关于bigdata1,在这篇文章zookeeper hadoop 集群 安装配置,有提到



转载请注明
作者:海底苍鹰
地址:http://blog.51yip.com/hadoop/2193.html

1 条评论

  1. 万象维度大浩劫 留言

    啊啊啊谢谢你啊!!!!!!!!!!!!!!!!!