2
votes

i want to run hbase in pseudo distributed mode, installation is from scratch.
step followed

  1. start HBase.
  2. Start HBase Master Server
  3. Start the region server a
  4. Start HBase Shell
  5. execute list

Hbase started normally so the hbase shell. When i checked zookeeper, master as well region all server were up. For any query on hbase shell prompt, i am getting this error.

Error - Can't get master address from ZooKeeper; znode data == null

code- configuration -
                hbase-site.xml 
                <configuration>
                   <property>
                      <name>hbase.cluster.distributed</name>
                      <value>true</value>
                   </property>
                   //Here you have to set the path where you want HBase to store its files.
                   <property>
                      <name>hbase.rootdir</name>
                      <value>hdfs://localhost:8030/hbase</value>
                   </property>
                   <property>
                      <name>hbase.zookeeper.property.dataDir</name>
                      <value>/home/hadoop/zookeeper</value>
                   </property>
                </configuration>

Above is my hbase-site.xml configuration.
Please help me to understand that what i am missing.

2
check path /hbase/master in zookeeper, it's abnormal as the error log declaims. maybe you can add to the steps what exact command you execute.sel-fish

2 Answers

2
votes

The following properties needs to be added to the hbase xml file in /hbase/conf folder:

<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2222</value>
<description>Property from ZooKeeper's config zoo.cfg.
The port at which the clients will connect.
</description>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/biadmin/my-local-hbase/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>bivm</value>
</property>

Also edit the hbase-env.sh file. Add the correct JAVA_HOME path and uncomment

export HBASE_MANAGES_ZK=true

This should resolve the above error!

0
votes

You need to set this property in your hbase-site.xml as well:

hbase.zookeeper.quorum