Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hbase org.apache.hadoop.hbase.PleaseHoldException

I want to try out the HBase-0.94 standalone mode and has followed the instruction in Quick Start.

I start hbase with start-hbase.sh and launch hbase shell

It seems that my master can't be initialized because my create table command always fails as following:

hbase(main):001:0> create 't1', 'cf'

ERROR: org.apache.hadoop.hbase.PleaseHoldException:    
org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

Here's my conf/hbase-site.xml file:

<configuration>
<property>
    <name>hbase.rootdir</name>
    <value>/home/manuzhang/hbase</value>
</property>
<property>
    <name>hbase.zookeeper.property.dataDir</name>
    <value>/home/manuzhang/zookeeper</value>
</property>
</configuration>

and my /etc/hosts file:

127.0.0.1   localhost
127.0.0.1       jmx_host
127.0.1.1   manuzhang-U24E

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

74.125.237.1 dl-ssl.google.com
like image 723
manuzhang Avatar asked Jan 22 '13 04:01

manuzhang


2 Answers

You have to edit your /etc/hosts file because HBase probably can't connect to localhost using 127.0.0.1

You should replace the line :

127.0.0.1       jmx_host

with

127.0.0.1   manuzhang-U24E

Restart HBase after that to and hopefully that fixes it.

like image 61
Charles Menguy Avatar answered Sep 24 '22 21:09

Charles Menguy


The HBase and /etc/hosts relationship is actually a very popular mystery. Although changing the line 127.0.1.1 or 127.0.0.1 might work, the process is actually quite involved.

When HBase is setting an RPC server, it’ll listen on the IP of the interface defined in "hbase.regionserver.dns.interface". (Well, not quite, actually, HBase will find the IPs of this interface, will look up for its hostname, and the first hostname of the first IP associated to this network interface will be used).

What if you didn’t provide anything? It’ll get you back your hostname, assuming that your host name is associated to the most reasonable interface.

Reference(Beautiful post. I would strongly suggest to read it once).

like image 25
Tariq Avatar answered Sep 24 '22 21:09

Tariq