Member since
01-19-2017
3681
Posts
633
Kudos Received
372
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 1602 | 06-04-2025 11:36 PM | |
| 2071 | 03-23-2025 05:23 AM | |
| 981 | 03-17-2025 10:18 AM | |
| 3733 | 03-05-2025 01:34 PM | |
| 2566 | 03-03-2025 01:09 PM |
05-10-2019
01:09 PM
@Adil BAKKOURI Have you seen my latest update?
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI You have done everything correctly but you are not selecting the existing database you created 🙂 See attached screenshot all should work !!! Please use the values of the hive DB created previously it should pick the correct URL and host !!
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI The attached /var/log/ambari-server/ambari-server-check-database.log shows you are trying to connect to postgres which is the embedded database. My guess is your ambari Server is using the embedded postgres database and NOT MySQL so what you need to do after installing and configuring MySQL and Hive is Install the mySQL driver adapt the commands according to your OS yum install -y mysql-connector-java Make the jars available for hive etc this won't effect the Postgres installation ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar Now continue with the Ambari hive setup it should succeed NOW!!!!
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI Can you firstly stop/ re-run ambari with the below command ambari-server stop Then ambari-server start --skip-database-check Your Ambari database has many orphaned config please see this Jira how to clean you Ambari database though it would be faster to start with a clean installation but it good to get your hands dirty !!! https://issues.apache.org/jira/browse/AMBARI-20875 CREATE TEMPORARY TABLE IF NOT EXISTS orphaned_configs AS (SELECT cc.config_id, cc.type_name, cc.version_tag FROM clusterconfig cc, clusterconfigmapping ccm WHERE cc.config_id NOT IN (SELECT scm.config_id FROM serviceconfigmapping scm) AND cc.type_name != 'cluster-env' AND cc.type_name = ccm.type_name AND cc.version_tag = ccm.version_tag); Followed by DELETE FROM clusterconfigmapping WHERE EXISTS (SELECT 1 FROM orphaned_configs WHERE clusterconfigmapping.type_name = orphaned_configs.type_name AND clusterconfigmapping.version_tag = orphaned_configs.version_tag); Followed by DELETE FROM clusterconfig WHERE clusterconfig.config_id IN (SELECT config_id FROM orphaned_configs); Followed by SELECT * FROM orphaned_configs; Then DROP TABLE orphaned_configs; Now you Ambari db should be clean to proceed with the hive setup
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI The below error tells me 2 things you are either using a MySQL server which is not supported or your jdbc driver version is not correct can you validate your Mysql database against the HXW support matrix 2019-04-16 15:55:44,477 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary. ERROR: Unable to connect to the DB. Please check DB connection properties. com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. Command failed after 1 tries I filtered the above for HDP 2.6
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI Any updates?
... View more
05-10-2019
01:09 PM
@Adil BAKKOURI You have a couple of issues, could you first align your MySQL server time to your local time. Can you re-run this command # Check your databases system time mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2019-04-13 20:41:04 |
+---------------------+ There are three places where the timezone might be set in MySQL in the file "my.cnf" in the [mysqld] section by setting default-time-zone='+00:00' To set it use either one: mysql> SELECT @@session.time_zone;
+---------------------+
| @@session.time_zone |
+---------------------+
| SYSTEM |
+---------------------+
1 row in set (0.00 sec) Now you can set it i.e SET time_zone = 'Europe/Helsinki'; SET time_zone = "+00:00"; SET @@session.time_zone = "+00:00"; # Re-Install the mysql jdbc connector yum install -y mysql-connector-java # Setup Ambari ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar You may need to recreate the hive user and schema and then after a successful startup, you can drop the old user and schema. Assuming your old hive user was [hiveold] # New Hive user assuming the root user password is {welcome1} mysql -u root -pwelcome1
create database hivedb;
CREATE USER 'hive'@'%' IDENTIFIED BY '{hive_password}';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost';
GRANT ALL PRIVILEGES ON hivedb.* TO 'hive'@'%';
GRANT ALL PRIVILEGES ON hivedb.* TO 'hive'@'localhost' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON hivedb.* to 'hive'@'localhost' identified by '{hive_password}';
GRANT ALL PRIVILEGES ON hivedb.* to 'hive'@'{YOUR_HOST_FQDN}' identified by '{hive_password}';
GRANT ALL PRIVILEGES ON hivedb.* TO 'hive'@'{YOUR_HOST_FQDN}';
GRANT ALL PRIVILEGES ON hivedb.* TO 'hive'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES; quit; After all the above now try to configure hive through Ambari and after saving the configuration your hive should start normally. Please keep me posted.
... View more
05-10-2019
09:32 AM
@Maurice Knopp You could save your company money 🙂 This is a trivial matter can you share your HS2 logs? What OS's are running on?
... View more
05-09-2019
05:18 AM
1 Kudo
@Erkan ŞİRİN Nice to know it worked just wondering didn't see --create-hive-table statement? can you try adding like below --hive-table azhadoop.iris_hive \
--create-hive-table \
--target-dir /tmp/hive_temp Please let me know
... View more
05-08-2019
10:10 PM
@Maurice Knopp Maria DB uses the MySQL drivers, you will need to the below steps to successfully deploy hive, this is my HDP 3.1 installation so I am pretty sure of what I am saying. The Hortonworks matrix helps you choose the right versions for compatibility for HDP 3.1.0 you will need MariaDB 10.2 or MySQL 5.7 only with InnoDB Ensure that you change the JDBC drivers as shown in the screen # yum install -y mysql-connector-java Make ambari aware of the driver ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar The above setup won't destroy your Ambari installation! Please let me know
... View more