zoukankan      html  css  js  c++  java
  • 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  将主机名设置正确

  • 相关阅读:
    Java 集合-Map集合嵌套 的遍历四种方式
    Java 集合-set集合,Map接口
    Java 集合 Collection
    Java中的各种转换
    Java 关于时间的类
    Java 中 String、StringBuffer、StringBuilder 类
    Java 构造函数,super,this,final,static
    Java 面向对象关键字
    ArrayList集合
    JAVA数组
  • 原文地址:https://www.cnblogs.com/zlslch/p/6149665.html
Copyright © 2011-2022 走看看