ERROR org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - ZooKeeper exists failed after 4 attempts

0 votes

I tried to create table in Hbase using Java API, but I am getting the below error.

10:12:56.478 [main] ERROR org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper - ZooKeeper exists failed after 4 attempts
10:12:56.482 [main] ERROR org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher - hconnection-0x2fb3536e0x0, quorum=localhost:2181, baseZNode=/hbase Received unexpected KeeperException, re-throwing exception
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/hbaseid
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:99) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
    at org.apache.zookeeper.KeeperException.create(KeeperException.java:51) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
    at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1045) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
    at org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper.exists(RecoverableZooKeeper.java:222) ~[hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.zookeeper.ZKUtil.checkExists(ZKUtil.java:541) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.zookeeper.ZKClusterId.readClusterIdZNode(ZKClusterId.java:65) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ZooKeeperRegistry.getClusterId(ZooKeeperRegistry.java:105) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.retrieveClusterId(ConnectionManager.java:879) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.<init>(ConnectionManager.java:635) [hbase-client-1.1.1.jar:1.1.1]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_171]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [?:1.8.0_171]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [?:1.8.0_171]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [?:1.8.0_171]
    at org.apache.hadoop.hbase.client.ConnectionFactory.createConnection(ConnectionFactory.java:238) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:420) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ConnectionManager.createConnection(ConnectionManager.java:413) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.ConnectionManager.getConnectionInternal(ConnectionManager.java:291) [hbase-client-1.1.1.jar:1.1.1]
    at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:222) [hbase-client-1.1.1.jar:1.1.1]
    at CreateTable1.main(CreateTable1.java:16) [hbase-1.4.12/:?]

How can I solve this?

Thank You

Mar 31 in Big Data Hadoop by akhtar
• 11,270 points
101 views

1 answer to this question.

0 votes

Hi@akhtar,

This error shows, Hbase is not able to connect Zookeeper server. To avoid this error you have to add the below given properties inside hbase-site,xml file.

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2182</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/root/Desktop/hbase/zookeeper</value>
</property>
</configuration>

Thank You

answered Mar 31 by MD
• 24,500 points

Related Questions In Big Data Hadoop

0 votes
1 answer

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

Hi@akhtar, This issue generally occurs when the memory ...READ MORE

answered Apr 17 in Big Data Hadoop by MD
• 24,500 points
316 views
0 votes
1 answer

Hadoop Pig: java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/filter/Filter

This seems like a problem with the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 69,060 points
500 views
0 votes
1 answer

Hadoop: Error: Could not find or load main class org.apache.hadoop.util.VersionInfo

This seems like a path issue. Add the ...READ MORE

answered Nov 16, 2018 in Big Data Hadoop by Omkar
• 69,060 points
4,736 views
0 votes
1 answer
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,116 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
732 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
30,403 views
0 votes
1 answer

ERROR org.apache.hadoop.hbase.regionserver.HRegionServer: ZooKeeper session expired

Hi@akhtar, To avoid this error you have to ...READ MORE

answered Mar 31 in Big Data Hadoop by MD
• 24,500 points
33 views
0 votes
1 answer

ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet!

Hi@akhtar, This error occurs if the hbase server ...READ MORE

answered Mar 30 in Big Data Hadoop by MD
• 24,500 points
156 views