在进入HBase客户端命令行,查看当前数据库中有哪些表时有可能会出现下面的这种错误?
[atguigu@hadoop102 hbase-1.3.1]$ bin/hbase shell
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/module/hbase-1.3.1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/module/hadoop-2.7.2/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.3.1, r930b9a55528fe45d8edce7af42fef2d35e77677a, Thu Apr 6 19:36:54 PDT 2017
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>
出现这种错误的原因也是非常普遍的,其实最有可能出现的就是有两点可能性,只要进行一一排除就可以进入shell命令行中进行接下来的操作。
解决方法:
1)、就是因为没有打开HBase集群直接进入shell命令出现的错误
2)、删除各个节点hbase自动生成的zookeeper文件(当使用的zookeeper时habse自带的时候),若是不可以还可以再尝试将hadoop中hbase的的目录删除(启动hadoop先,hadoop fs -rm -r /hbase)