当前位置:   article > 正文

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

znode==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> 

 
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/699130
推荐阅读
相关标签
  

闽ICP备14008679号