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.

Hive DB issue in connection

Solved Go to solution

Re: Hive DB issue in connection

Contributor

cat /etc/ambari-server/conf/ambari.properties | grep mysql
custom.mysql.jdbc.name=mysql-connector-java.jar
previous.custom.mysql.jdbc.name=mysql-connector-java.jar

Re: Hive DB issue in connection

Mentor

@irfangk1 
Can you share the screenshot of your Ambari Hive config  because when I see "jdbc:mysql://host.com/metastore" "hive"   that means you dont have  not The default  TCP port 

for PostgreSQL is usually 5432 see in the postgresql.conf

Re: Hive DB issue in connection

Contributor

Mysql is not starting now check the below error

service mysql restart
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.


& after putting port of mysql,

WARNING: File /var/lib/ambari-agent/cache/DBConnectionVerification.jar already exists, assuming it was downloaded before
WARNING: File /var/lib/ambari-agent/cache/mysql-connector-java.jar already exists, assuming it was downloaded before
2019-10-11 10:26:28,466 - call['/usr/jdk64/jdk1.8.0_112/bin/java -cp /var/lib/ambari-agent/cache/DBConnectionVerification.jar:/var/lib/ambari-agent/cache/mysql-connector-java.jar -Djava.library.path=/var/lib/ambari-agent/cache org.apache.ambari.server.DBConnectionVerification "jdbc:mysql://172.27.3.12: 3306" "hive" [PROTECTED] com.mysql.jdbc.Driver'] {}
2019-10-11 10:26:28,607 - call returned (1, 'ERROR: Unable to connect to the DB. Please check DB connection properties.\ncom.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot load connection class because of underlying exception: \'java.lang.NumberFormatException: For input string: " 3306"\'.')
2019-10-11 10:26:28,608 - DB connection check completed.
2019-10-11 10:26:28,608 - Host checks completed.
2019-10-11 10:26:28,608 - Check db_connection_check was unsuccessful. Exit code: 1. Message: ERROR: Unable to connect to the DB. Please check DB connection properties.
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Cannot load connection class because of underlying exception: 'java.lang.NumberFormatException: For input string: " 3306"'.

Command failed after 1 tries

 

Re: Hive DB issue in connection

Mentor

@irfangk1 

 

That means you didn't install MySQL. Can I ask you one question? What documentation are you using as a reference?The basic steps are described when you are preparing the environment. To me it seems you launched the deployment using the embedded database Postgresql but now you want to switch to MySQL. To do that you need to install mysql and pre-create the ambari database before launching the Ambari server setup, that explains why you are getting all those errors.
I can send you a procedure in 9 hours

Re: Hive DB issue in connection

Contributor

Please send procedure. Thanks 

Highlighted

Re: Hive DB issue in connection

Mentor

@irfangk1 

 

Please download it from here irfangk1_download

HTH

Re: Hive DB issue in connection

Contributor

Hi Shelton,

I am waiting for the procedure

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