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

Hbase报错:ERROR: Can’t get master address from ZooKeeper; znode data == null

Hbase报错:ERROR: Can't get master address from ZooKeeper; znode data == null_第1张图片

方法一:

查看日志报SessionExpiredException: KeeperErrorCode = Session expired for /hbase/master

原因一: 所以是hbase 和 zookeeper之间会话超时了,按照官网的常见问题说法: http://hbase.apache.org/1.2/book.html

If you wish to increase the session timeout, add the following to your hbase-site.xml(修改这个配置文件) to increase the timeout from the default of 60 seconds to 120 seconds.

<property>
  <name>zookeeper.session.timeout</name>
  <value>1200000</value>
</property>
<property>
  <name>hbase.zookeeper.property.tickTime</name>
  <value>6000</value>
</property>

然后重启hbase就可以了
Hbase报错:ERROR: Can't get master address from ZooKeeper; znode data == null_第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>

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

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

你可能感兴趣的:(大数据,hbase,大数据)