Reputation: 883
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........................................................
Upvotes: 9
Views: 11736
Reputation: 577
i just fixed the problem by deleting the hbase.rootdir and the hbase.zookeeper.property.dataDir folders. for example:
more conf/hbase-site.xml
gives me: hbase.rootdir file:///somepath/hbase/testuser/hbase hbase.zookeeper.property.dataDir /somepath/hbase/testuser/zookeeper
then remove the old data:
rm -fr /somepath/hbase/testuser/hbase
mkdir -p /somepath/hbase/testuser/hbase
rm -fr /somepath/hbase/testuser/zookeeper
mkdir -p /somepath/hbase/testuser/zookeeper
then to start it:
bin/start-hbase.sh
and finally i could connect to the local instance:
./bin/hbase shell
Upvotes: 1
Reputation: 11
I had similar issue and got the same error message as above. In my case HMaster was not running. Using
sudo start-hbase.sh
resolved the issue.
Upvotes: 1
Reputation: 21
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>
Upvotes: 2
Reputation: 3261
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:
Zookeeper:
HBase:
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?
Upvotes: 4