码迷,mamicode.com
首页 > 其他好文 > 详细

hbase无法启动,The node /hbase is not in ZooKeeper

时间:2016-12-09 16:18:58      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:images   manager   rom   span   lan   分享   strong   服务   sdn   

   问题详细描述如下:

2016-12-09 15:10:39,160 ERROR [org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation] - The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent‘. There could be a mismatch with the one configured in the master.
2016-12-09 15:10:39,264 ERROR [org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation] - The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent‘. There could be a mismatch with the one configured in the master.

技术分享

 

 

  首先,说下我在哪个环节碰到过这个问题。

  HBase Java API编程这一步。

 

 

伪分布模式下,如(djt002)
       hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是true,它表示HBase使用自身自带的Zookeeper实例。
但是,该实例只能为单机或伪分布模式下的HBase提供服务。

 

当然,你也可以,在单击或伪分布模式下,使用外置安装的Zookeeper。

技术分享

 技术分享

 

 


若是分布式模式,则需要配置自己的Zookeeper集群。如(HadoopMaster、HadoopSlave1、HadoopSlave2)
    hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是true,它表示,分布式模式里,在启动HBase时,HBase将Zookeeper作为自身的一部分运行。进程变为HQuorumPeer。
    hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是false,它表示,分布式模式里,需要,先提前手动,每个节点都手动启动Zookeeper,然后再在主节点上启动
HBase时,进程变为HMaster(HadoopMaster节点)。

 

 

 

 

  问题的解决办法:

这个坑搞了很久

主要原因是独立安装的zookeeper并没有创建/znode

导致Hbase无法定位到默认的znode---  /hbase

解决方法:

   运行zookeeper:./zkCli.sh

   创建znode:          create /hbase myhbase

现在重启hbase ,hmaster和regionserver正常启动

但是hbase shell出现bug

 

 

  若,还出现如下问题的话,则

 Can‘t get master address from ZooKeeper; znode data == null

这可能是hostname出现问题

     解决方案:

修改/etc/hostname  将主机名设置正确

 

hbase无法启动,The node /hbase is not in ZooKeeper

标签:images   manager   rom   span   lan   分享   strong   服务   sdn   

原文地址:http://www.cnblogs.com/zlslch/p/6149665.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!