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

   问题详细描述如下:

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  将主机名设置正确

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值