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, 2020 in Big Data Hadoop by akhtar
• 38,260 points
3,757 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, 2020 by MD
• 95,460 points

Related Questions In Big Data Hadoop

+1 vote
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, 2020 in Big Data Hadoop by MD
• 95,460 points
31,072 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,220 points
2,054 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,220 points
12,759 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
• 11,380 points
11,061 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
• 11,380 points
2,562 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,996 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, 2020 in Big Data Hadoop by MD
• 95,460 points
1,966 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, 2020 in Big Data Hadoop by MD
• 95,460 points
5,490 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP