Stand alone HBase on local file system getting zookeeper error?

独自空忆成欢 提交于 2019-12-02 03:34:18

Your zookeeper quorum name must be the hostname of your machine and must also be present in the /etc/hosts file. Try restarting the network after this.

The problem is here (in your conf - conf/hbase-site.xml):

<name>hbase.zookeeper.quorum</name>
      <value>localhost</value>

As the error "ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries" indicates there is some problem with your zookeeper.quorum directive. Or Before staring the HBase shell you can verify if the ZKQuorum is up, using:

$ jps

the command will list all the java processes on the machine i.e. the probable output has to be:

62019 Jps
61098 HMaster        
61233 HRegionServer     
61003 HQuorumPeer

Solution:

In your HBase directory, first stop the HBase:

$ ./bin/stop-hbase.sh

If you're trying to work out the 'standalone HBase' example - stick to the minimum conf provided in the example:

<configuration>
  <property>
    <name>hbase.rootdir</name>
    <value>file:///home/adio/workspace/hadoop/hbase/directories/hbase</value>
  </property>
  <property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/adio/workspace/hadoop/hbase/directories/zookeeper</value>
  </property>
</configuration>

i.e. your conf/hbase-site.xml should have the above content.

Once set, now start the HBase again:

$ ./bin/start-hbase.sh
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!