The node /hbase-unsecure is not in ZooKeeper. Chec

2019-08-07 14:05发布

问题:

I am getting this error while starting standalone hBase on my ubuntu machine. Please help. Spent a huge amount of time to get it running. :( What I have checked so far -

  1. /etc/hosts contains localhost 127.0.0.1
  2. HBase : hbase-0.98.3-hadoop2-bin.tar.gz
  3. Hadoop: hadoop-2.6.0.tar.gz
  4. I already have the node /hbase-unsecure in my hbase-site.xml.

When I try to run the command - create 'usertable', 'resultfamily'

It gives me following exception -

ERROR: The node /hbase-unsecure 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-site.xml

<?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

    <configuration>
      <property>
        <name>hbase.rootdir</name>    
        <value>hdfs://localhost:54310/hbase</value>
      </property>

      <property>
        <name>hbase.zookeeper.property.dataDir</name>
        <value>/home/hduser/zookeeper</value>
      </property>

      <property>
          <name>hbase.zookeeper.property.clientPort</name>
          <value>2181</value>
          <description>Property from ZooKeeper's config zoo.cfg.
          The port at which the clients will connect.
          </description>
      </property>

      <property>
            <name>hbase.cluster.distributed</name>
            <value>true</value>
        </property>

       <property>
            <name>zookeeper.znode.parent</name>
            <value>/hbase-unsecure</value>
        </property>

        <property>
          <name>hbase.zookeeper.quorum</name>
          <value>localhost</value>
          <description>Comma separated list of servers in the ZooKeeper Quorum.
          </description>
        </property>

      <property>
             <name>dfs.replication</name>
             <value>1</value>
        </property>

      <property>
            <name>hbase.master</name> 
            <value>hadoop-master:60000</value>
      </property>

    </configuration>

回答1:

Can you verify that hbasee-unsecure folder is present in your zookeeper?

You can just login into zookeeper by using below command and do ls.

zookeeper-client

Above command will open zookeeper shell and then do ls.

ls /

This will show folders present with zookeeper.

It should have hbase-unsecure folder in it.



回答2:

Need to check the HBase log for the errors, most commonly the solution is setting correct parameters in the HBase-env.sh file.

Please refer the complete answer here.

https://sarangmanjrekar.wordpress.com/2016/10/06/node-hbase-is-not-in-zookeeper/



标签: hadoop hbase