首页 > 分享 > Can‘t get master address from ZooKeeper; znode data == null解决办法

Can‘t get master address from ZooKeeper; znode data == null解决办法

问题描述如下:

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 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(main):002:0> list

TABLE

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

Here is some help for this command:

List all 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(main):003:0>

 出现此问题可能是zookeeper不稳定造成的,采用的是虚拟机,经常挂起的状态,使用hbase的list命令出现下面错误,这个可能是hbase的稳定性造成的,解决办法有两种。这里使用第一种办法就解决了。

解决方法:

1.重启hbase

stop-hbase.sh

然后

  2.start-hbase.sh

  或者,要么实在不行,就关掉所有集群。再重新开启吧!

2.解决方法2:

(1)原因:运行hbase(zookeeper)的用户无法写入zookeeper文件,导致znode data为空。

解决:在hbase-site.xml指定一个运行hbase的用户有写入文件权限的目录作为zookeeper数据目录,如
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/user88/zk_data</value>
  </property>

(2)hbase-site.xml文件中的

<property>  
<name>hbase.rootdir</name>   
<value>hdfs://hadoop1:49002/hbase</value>  
</property>

rootdir中的IP设定很重要,需要设定对应的IP

与core-site.xml中fs.defaultFS中的路径不相同

<property>
      <name>fs.defaultFS</name>
      <value>hdfs://hadoop1:9000</value>
  </property>

3.弱智原因,弄了半天一直在datanode上启动操作,没有在namenode上操作HBase,回到master理科成功!!!!

相关知识

This site can’t be reached
Huahua's Tech Road
ssm框架鲜花完整项目前台后台实现包含sql
Database Exception – yii\db\Exception
mysql5.6中binlog
旅游业的季节性
be tired of厌烦于 = be fed up with = be sick with be tired from因
网上购物 Online Shopping英语作文范文(通用11篇)
宋兆基/yolov5
Educoder/头歌JAVA——Java Web:基于JSP的网上商城

网址: Can‘t get master address from ZooKeeper; znode data == null解决办法 https://m.huajiangbk.com/newsview640854.html

所属分类:花卉
上一篇: 毕业送花,送师兄师姐什么花?中国
下一篇: 纪念花素材