Hbase出現ERROR: 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

  1. 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.解決方法2:格式化namenode
  這里,不多贅述。但是一般沒到沒辦法情況下,不要去格式化。

  至於,為什么,請見

Hadoop的多節點集群啟動,唯獨沒有namenode進程?(血淋淋教訓,一定拍快照)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

歡迎大家,加入我的微信公眾號:大數據躺過的坑        人工智能躺過的坑
 
 
 

同時,大家可以關注我的個人博客

   http://www.cnblogs.com/zlslch/   和     http://www.cnblogs.com/lchzls/      http://www.cnblogs.com/sunnyDream/   

   詳情請見:http://www.cnblogs.com/zlslch/p/7473861.html

 

  人生苦短,我願分享。本公眾號將秉持活到老學到老學習無休止的交流分享開源精神,匯聚於互聯網和個人學習工作的精華干貨知識,一切來於互聯網,反饋回互聯網。
  目前研究領域:大數據、機器學習、深度學習、人工智能、數據挖掘、數據分析。 語言涉及:Java、Scala、Python、Shell、Linux等 。同時還涉及平常所使用的手機、電腦和互聯網上的使用技巧、問題和實用軟件。 只要你一直關注和呆在群里,每天必須有收獲

 

      對應本平台的討論和答疑QQ群:大數據和人工智能躺過的坑(總群)(161156071) 

 

 

 

 

 

 

 

 

 

 

 

 



免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM