問題一:安裝完成后在Hbase shell 命令行執行list命令時,爆出如下錯誤:
hbase(main):001:0> list
TABLE
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hbase-0.98.9-hadoop2/lib/phoenix-4.2.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hbase-0.98.9-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop-2.6.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2017-07-14 15:06:48,032 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicableERROR: Can't get master address from ZooKeeper; znode data == nullHere is some help for this command:
List all tables in hbase. Optional regular expression parameter could
be used to filter the output. Examples:hbase> listhbase> list 'abc.*'hbase> list 'ns:abc.*'hbase> list 'ns:.*'
對應的部分log內容:
由以上的信息得出問題是不能從zookeeper中得到master地址。用hbase zkcli命令查看
zk: xxxx:2181(CONNECTED) 0] ls /
[hbase, zookeeper]
[zk: xxxx:2181(CONNECTED) 1] ls /hbase
[meta-region-server, backup-masters, table, draining, region-in-transition, table-lock, balancer, namespace, hbaseid, online-snapshot, replication, splitWAL, recovering-regions, rs]
確實沒有master文件夾。然后就關閉hbase和hadoop,清空zookeeper的data目錄(不清楚data目錄在哪,可在zookeeper/conf下的zoo.cfg文件中查看如下圖所示),在重啟就好了。
出現了master文件夾
[zk: xxxx:2181(CONNECTED) 0] ls /hbase
[meta-region-server, backup-masters, table, draining, region-in-transition, table-lock, running, master, namespace, hbaseid, online-snapshot, replication, splitWAL, recovering-regions, rs]
但問題的具體原因還不清除。
問題二:
同樣在執行list命令時,又報錯ERROR:org.apache.hadoop.hbase.PleaseHoldException: Master is initializing。如下圖所示:
進一步查看關鍵log信息如下:
發現好像是有關host配置的問題造成節點間的鏈接出現了異常,于是又去檢查了host的配置信息以及hbase-site的配置,最終發現原來是在配置hbase-site時將hbase.rootdir這個屬性配置錯了,更改后就OK了(如果在安裝Hbase時,是一個節點配置錯誤后將配置文件傳到其他的各個節點,記得要更改所有的節點的配置文件)
至于其他的問題想起來再接著更新吧。
但是不管是什么問題,如果不能一下搞定記得去查看LOG,根據log去分析問題,你就能找到問題的解決辦法。