Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to resolve Unable to read HiveServer2 configs from ZooKeeper

Solved Go to solution
Highlighted

How to resolve Unable to read HiveServer2 configs from ZooKeeper

Explorer

Caused by: java.sql.SQLException: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:134) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:247) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper$1.run(HiveConnectionWrapper.java:78) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper$1.run(HiveConnectionWrapper.java:75) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1869) at org.apache.ambari.view.hive20.internal.HiveConnectionWrapper.connect(HiveConnectionWrapper.java:75) ... 98 more Caused by: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.configureConnParams(ZooKeeperHiveClientHelper.java:96) at org.apache.hive.jdbc.Utils.configureConnParams(Utils.java:514) at org.apache.hive.jdbc.Utils.parseURL(Utils.java:434) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:132) ... 107 more Caused by: org.apache.hive.jdbc.ZooKeeperHiveClientException: Tried all existing HiveServer2 uris from ZooKeeper. at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.configureConnParams(ZooKeeperHiveClientHelper.java:68) ... 110 more

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

Hi @Hamilton Castro!
Could you check your ZK namespace under the hiveserver2 path?
Would be like this:

[root@node3 ~]# zookeeper-client 
Connecting to localhost:2181
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /hiveserver2
[serverUri=node3:10000;version=1.2.1000.2.6.5.0-292;sequence=0000000013]
btw, if your zk hosts it's not under the hosts as HS2, check if HS2 can reach 2181 port from ZK host
Hope this helps!

View solution in original post

7 REPLIES 7
Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

Hi @Hamilton Castro!
Could you check your ZK namespace under the hiveserver2 path?
Would be like this:

[root@node3 ~]# zookeeper-client 
Connecting to localhost:2181
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] ls /hiveserver2
[serverUri=node3:10000;version=1.2.1000.2.6.5.0-292;sequence=0000000013]
btw, if your zk hosts it's not under the hosts as HS2, check if HS2 can reach 2181 port from ZK host
Hope this helps!

View solution in original post

Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

New Contributor

I have the same output as you do : [serverUri=sandbox-hdp.hortonworks.com:10000;version=3.1.0.3.0.1.0-187;sequence=0000000008]

But I still get the following output when I try to start the sample.sh script that comes with Kylin:

[main]: ERROR jdbc.Utils: Unable to read HiveServer2 configs from ZooKeeper

Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

Explorer

How do I check if HS2 can reach port 2181?

Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

New Contributor

Did you find the solution. I have the same error.

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

hive namespace was not created in zookeeper but ui work sometime and sometime not. I changed the namespace,restarted the hive service and it started working.

Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

@Sidharth Kumar

How you resolved this ? Can you share the exact steps or command.

In my case is showing like below.

hive.server2.zookeeper.namespace=hiveserver2

hive.zookeeper.namespace=hive_zookeeper_namespace

Highlighted

Re: How to resolve Unable to read HiveServer2 configs from ZooKeeper

New Contributor

1. Stop Hive service.

2. Delete hive service followed by its dependencies.
3. Restart HDFS, YARN, ZOOKEEPER.

4. Install HIVE, refresh hive client config on every host.

5. Start Hive service.

 

Check logs in back-end, some times you could see permission denied to remove "/var/lib/spark2/shs_db/listing.ldb", just remove it manually and restart the service.

Don't have an account?
Coming from Hortonworks? Activate your account here