Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZookeeperConnectionException in HBase Standalone mode

Tags:

hbase

I'm using hbase-0.90.0. I'm running it in standalone mode. While trying to execute any commands from "hbase shell" it is giving me the following error.

hbase(main):003:0> status 'detailed'

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

I'm new to HBase. Can you please help me out with this problem?

Thanks in advance

like image 811
srinivasarao Avatar asked Feb 09 '11 07:02

srinivasarao


2 Answers

For one reason or another your HBase Client is not talking to Zookeeper. I just had the same problem and the issue for me was that the hbase config (hbase-site.xml) had the wrong port for the zookeeper (The default is 2181 and someone had set it to 2182 incorrectly). The config for using zookeeper is at http://hbase.apache.org/book.html#zookeeper.

Also checking what hbase and zookeeper think their names are and what they actually are. A usual suspect is that the /etc/hosts file has some extra entries for localhost / 127.0.0.1. So make sure your localhost has only one line for localhost and put all the aliases for 127.0.0.1 on a single line in /etc/hosts

Sometimes having the ipv4 and ipv6 entries in localhost confuses things, so try commenting out all the ipv6 entries (the ones with colons ':' in the address.)

like image 149
Robert J Berger Avatar answered Nov 13 '22 02:11

Robert J Berger


so i had the exact same problem and changing the /etc/hosts file did it for me. I changed it so that 'localhost' and my host name both pointed to '127.0.0.1'

see http://comments.gmane.org/gmane.comp.java.hadoop.hbase.user/19718 for more details.

like image 24
thuang513 Avatar answered Nov 13 '22 03:11

thuang513