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.

unable to read hiveserver2 configs from zookeeper (state=,code=0)

Solved Go to solution

unable to read hiveserver2 configs from zookeeper (state=,code=0)

Explorer

Hi all, I have installed ambari and every service was running good, but im getting 2 alerts on hive. i tried to resolve but i'm unable to do that. can anyone help me out?

- i'm able to login to mysql and beeline also.

==================

Hive error

==========================================================================================

root@ARIES-HDP-WNODE1:/etc# beeline -u "jdbc:hive2://aries-hdp-wnode1.ariessystem.us:2181,aries-hdp-mnode.ariessystem.us:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2" Connecting to jdbc:hive2://aries-hdp-wnode1.ariessystem.us:2181,aries-hdp-mnode.ariessystem.us:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2 Error: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper (state=,code=0) Beeline version 1.2.1000.2.6.5.0-292 by Apache Hive 0: jdbc:hive2://aries-hdp-wnode1.ariessystem. (closed)>

==============================================================================================

Here i attach the hive server log and alert pictures from ambarihive-metastore-log.txt

hive-alert1.pnghive-alert-2.pngalert-3.png

@Jay Kumar SenSharma

1 ACCEPTED SOLUTION

Accepted Solutions

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Hello @Deepak SANAGAPALLI!
Could you check your mysql connector?

#[root@node1 ~]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar #I made my setup with this jdbc-driver
#Finding my jar
[root@node1 ~]# find / -name "mysql-connector-java.jar" -type f
/tmp/mysql-connector-java.jar
/usr/share/java/mysql-connector-java.jar
/var/lib/ambari-server/resources/mysql-connector-java.jar
[root@node1 ~]# ls -ltrah /var/lib/ambari-server/resources/mysql-connector-java.jar
-rw-r--r-- 1 root root 864K Jul 26 23:48 /var/lib/ambari-server/resources/mysql-connector-java.jar
[root@node1 ~]# ls -ltrah /usr/share/java/mysql-connector-java.jar
-rw-r--r-- 1 root root 864K Jul 26 22:52 /usr/share/java/mysql-connector-java.jar

Hope this helps!

16 REPLIES 16

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Hello @Deepak SANAGAPALLI!
Could you check your mysql connector?

#[root@node1 ~]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar #I made my setup with this jdbc-driver
#Finding my jar
[root@node1 ~]# find / -name "mysql-connector-java.jar" -type f
/tmp/mysql-connector-java.jar
/usr/share/java/mysql-connector-java.jar
/var/lib/ambari-server/resources/mysql-connector-java.jar
[root@node1 ~]# ls -ltrah /var/lib/ambari-server/resources/mysql-connector-java.jar
-rw-r--r-- 1 root root 864K Jul 26 23:48 /var/lib/ambari-server/resources/mysql-connector-java.jar
[root@node1 ~]# ls -ltrah /usr/share/java/mysql-connector-java.jar
-rw-r--r-- 1 root root 864K Jul 26 22:52 /usr/share/java/mysql-connector-java.jar

Hope this helps!

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Explorer

mysql-jdbc-connector-error.pngHI @Vinicius Higa Murakami, Thank you for your reply. I don't see any MySQL-connector-java.jar when i run this command "

find / -name "mysql-connector-java.jar" -type f ". I'm getting this error when i ran this command "

#[root@node1 ~]# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar #I made my setup with this jdbc-driver". Please look at the attached screen shot and cloud you please help me out in how to install those MySQL-jdbc conector. Thanks in advance and i appreciate your help.

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Explorer

Hi @Vinicius Higa Murakami, just to confirm I need to just download the mysql-connector-java.jar, am i correct??

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Hi @Deepak SANAGAPALLI!
If you chose MYSQL as your flavour to HiveMetaStore yeah :)
Just one thing, make sure to do this at the ambari server host

Hope this helps!

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Mentor

@Deepak SANAGAPALLI

If the MySQL connector doesn't exist just run the below command the default install dir is /usr/share/java/

# yum install -y mysql-connector-java 

Then rerun the ambari setup

# ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

That should resolve the issue

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Explorer

Hi @Geoffrey Shelton Okot @Vinicius Higa Murakami , i'm using Ubuntu so my command will be

1. apt-get install -y mysql-connector-java

2. ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar

Is this right? Thank you for you help all of you.

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Yeah! It is :)
Just don't forget to restart your ambari-server okay?

ambari-server restart

Hope this helps!

Re: unable to read hiveserver2 configs from zookeeper (state=,code=0)

Explorer

Hi @Vinicius Higa Murakami @Geoffrey Shelton Okot when i ran this command "apt-get install -y mysql-connector-java " mysqlerror.pngI'm getting this error.

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