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
- stop-hbase.sh
然后
将namenode的信息删除,重新格式化
重新启动,hbase正常
2.start-hbase.sh
或者,要么实在不行,就关掉所有集群。再重新开启吧!
方法2:格式化namenode
将namenode的信息删除,重新格式化
重新启动,hbase正常