Hbase学习笔记二:解决ERROR: Can't get master address from ZooKeeper; znode data == null

问题描述

运行Hbase shell时报错:
hbase(main):006: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(zookeeper)的用户无法写入zookeeper文件,导致znode data为空
解决如下:
格式化hdfs  进入Hadoop/bin 目录下 : ./hadoop namenode –format
启动 zookeeper
启动 hadoop 
启动 hbase 

进入hbase shell 成功,执行list如下:

hbase shell
2017-02-15 16:19:01,906 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
2017-02-15 16:19:58,786 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/cdh5.9.1/hbase/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/cdh5.9.1/hadoop/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.
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.2.0-cdh5.9.1, rUnknown, Wed Jan 11 13:57:35 PST 2017


hbase(main):001:0> list
TABLE                                                                                                                                                                   
0 row(s) in 13.4580 seconds


=> []
hbase(main):002:0> 

 
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值