Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HBase connection exception

Tags:

hadoop

hbase

I try to run HBase in a Pseudo-Distributed mode. But it doesn't work after I set hbase-site.xml.

Each time I try to run a command inside hbase shell I get this error:

ERROR: org.apache.hadoop.hbase.ZooKeeperConnectionException: org.apache.hadoop.hbase.ZooKeeperConnectionException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = connectionLoss for /hbase

I set up ssh and make sure all port are correct.

Moreover, I cannot stop hbase though ./bin/stop-hbase.sh. I only get the follow output.

stopping hbase........................................................
like image 811
Terminal User Avatar asked Jan 22 '11 02:01

Terminal User


2 Answers

Pseudo-distributed means that you are running all of the processes on one machine. You need to check that all of the required processes are running:

Hadoop:

  • NameNode
  • DataNode
  • JobTracker
  • TaskTracker

Zookeeper:

  • HQuorumPeer

HBase:

  • HMaster
  • RegionServer

You also need to ensure that your hbase-site.xml contains the correct entries for zookeeper defining the host name and the port. The HBase FAQ and Wiki are really quite good. What are you missing from there?

like image 111
David Avatar answered Oct 05 '22 00:10

David


It's because the HBase documentation has you setup your HDFS settings to point to port 8020, but the Hadoop instructions configure HDFS for port 9000.

Change hbase-site.xml settings that HBase recommends to point to port 9000 instead:

<property>
  <name>hbase.rootdir</name>
  <value>hdfs://localhost:9000/hbase</value>
  <description>The directory shared by RegionServers.
  </description>
</property>
like image 20
sbowman Avatar answered Oct 04 '22 23:10

sbowman