Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Cannot install Hive?

avatar
Expert Contributor

Hi.

I have reinstalled my cluster (HDP 2.6.0.3 (Ambari 2.5.0.3)) and cannot get hive to work. I removed it from one node and added it to another but it (hiverserver2) still won't start. I get this error:

resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/hdp/current/hive-server2/lib/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification 'jdbc:mysql://s1.royble.co.uk/hive?createDatabaseIfNotExist=true' hive [PROTECTED] com.mysql.jdbc.Driver' returned 1. ERROR: Unable to connect to the DB. Please check DB connection properties.java.sql.SQLException: Access denied for user 'hive'@'s2.royble.co.uk' (using password: YES)

I saw this solution, but I do not have the required file on my computer, and I think I am missing lots of Hive stuff, for example there are no hive* folders below usr/hdp . Any idea how I can get Hive installed correctly?

1 ACCEPTED SOLUTION

avatar
@ed day

This Error "Access denied for user 'hive'@'s2.royble.co.uk' (using password: YES)" itself states that you are entering wrong password for hive user crerated in Mysql.

To solve this Login to mysql

mysql> drop database hive;

And retry the installation of Hive service in ambari.

View solution in original post

5 REPLIES 5

avatar
@ed day

This Error "Access denied for user 'hive'@'s2.royble.co.uk' (using password: YES)" itself states that you are entering wrong password for hive user crerated in Mysql.

To solve this Login to mysql

mysql> drop database hive;

And retry the installation of Hive service in ambari.

avatar
Expert Contributor

Thanks I am not using mysql but derby. I tried switching to mysql using this, but I cannot ' Downloadmysql-connector-java-5.0.5.jar file and copy it to $HIVE_HOME/lib directory.' since I do not have such a directory!

avatar
Master Mentor

@ed day

You are getting Access Denied while accessing mysql. So looks like you have node set the PRIVILEGES properly inside the mysql DB.

Please see: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.2.0/bk_ambari-reference/content/using_hive_with...

 # mysql -u root -p
CREATE USER '<HIVEUSER>'@'localhost' IDENTIFIED BY '<HIVEPASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'localhost';
CREATE USER '<HIVEUSER>'@'%' IDENTIFIED BY '<HIVEPASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'%';
CREATE USER '<HIVEUSER>'@'<HIVEMETASTOREFQDN>' IDENTIFIED BY '<HIVEPASSWORD>';
GRANT ALL PRIVILEGES ON *.* TO '<HIVEUSER>'@'<HIVEMETASTOREFQDN>';
FLUSH PRIVILEGES;

.

avatar
Master Mentor

@ed day

The link that you shared to migrate from Derby to MySQL seems to be too old (2013) and there are many changes and enhancements made in hive.

I do not see "Derby" database in the supported list of Databases in: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.0/bk_support-matrices/content/ch_matrices-hdp... So if this is your fresh cluster then you should install Hive with the supported databases to avoid the DB issues.

HDP 2.6 Hive Database Requirements

PostgreSQL 9.1.13+, 9.3, 9.4***
MariaDB 10*
MySQL 5.6****
Oracle 11gr2
Oracle 12c**
By default (on RHEL/CentOS/Oracle Linux 6), Ambari installs an instance of MySQL
                on the Hive Metastore host. Otherwise, you need to use an existing instance of
                PostgreSQL, MySQL or Oracle. 

.

avatar
Expert Contributor

Thanks. I was getting confused: it was mysql all along.