开发者

HBase connection exception

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 on开发者_Python百科ly get the follow output.

stopping hbase........................................................


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?


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>


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.


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜