HBase – Unable to suppress fs closing hooks… here is a solution to the problem.
HBase – Unable to suppress fs closing hooks
I tried to start HBase in IDEA by running the HMaster class but got this error :
java.lang.RuntimeException: Failed suppression of fs shutdown hook: Thread[Thread-8,5,main]
at org.apache.hadoop.hbase.regionserver.ShutdownHook.suppressHdfsShutdownHook(ShutdownHook.java:196)
at org.apache.hadoop.hbase.regionserver.ShutdownHook.install(ShutdownHook.java:83)
at org.apache.hadoop.hbase.util.JVMClusterUtil.startup(JVMClusterUtil.java:191)
at org.apache.hadoop.hbase.LocalHBaseCluster.startup(LocalHBaseCluster.java:420)
at org.apache.hadoop.hbase.master.HMasterCommandLine.startMaster(HMasterCommandLine.java:149)
at org.apache.hadoop.hbase.master.HMasterCommandLine.run(HMasterCommandLine.java:104)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.hbase.util.ServerCommandLine.doMain(ServerCommandLine.java:76)
at org.apache.hadoop.hbase.master.HMaster.main(HMaster.java:2100)
For reference only, the /etc/hosts file contains only
127.0.0.1 – machine name
Here is the core-site .xml
<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:8020</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/ubuntu/Desktop/hdfs/tmp</value>
</property>
</configuration>
and
hbase-site.xml
<configuration>
<property>
<name>hbase.rootdir</name>
<value>/usr/lib/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/usr/lib/zookeeper</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
</configuration>
Solution
I had a similar issue, but in standalone mode. Here’s how I solved the problem :
- Check the output of “hostname” and “
hostname
-f” to make sure
The output of the command “hostname” contains only the host name, instead
“hostname -f” contains the FQDN. If not, fix this first. - I ran it as root using the command “
sudo bin/start-hbase.sh
“
I
still don’t know the root cause of this issue, but after I followed the steps above, the Hbase instance is running. Hope this helps!