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.

Ranger fails to install with Blueprint

Solved Go to solution

Ranger fails to install with Blueprint

Expert Contributor

Hi,

In my test environment Ranger install with Ambari Blueprint fails with with DB access error. I have added RANGER_ADMIN, HIVE_SERVER, HIVE_METASTORE and MYSQL_SERVER components to the blueprints. The MySQL server has been correctly installed/configured by Ambari and it seems that Hive is able to use it without any problem, but Ranger setup fails with the following error:

17 15:40:00,148  [I] Running DBA setup script. QuiteMode:True
2017-11-17 15:40:00,149  [I] Using Java:/usr/lib/jvm/java/bin/java
2017-11-17 15:40:00,149  [I] DB FLAVOR:MYSQL
2017-11-17 15:40:00,149  [I] DB Host:
2017-11-17 15:40:00,149  [I] ---------- Verifying DB root password ---------- 
2017-11-17 15:40:00,150  [I] DBA root user password validated
2017-11-17 15:40:00,150  [I] ---------- Verifying Ranger Admin db user password ---------- 
2017-11-17 15:40:00,150  [I] admin user password validated
2017-11-17 15:40:00,150  [I] ---------- Creating Ranger Admin db user ---------- 
2017-11-17 15:40:00,150  [JISQL] /usr/lib/jvm/java/bin/java  -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java-5.1.39-bin.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql:///mysql -u root -p '********' -noheader -trim -c \; -query "SELECT version();"
SQLException : SQL state: 28000 java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) ErrorCode: 1045
2017-11-17 15:40:00,714  [E] Can't establish db connection.. Exiting..
Traceback (most recent call last):

Please note that logging in to the machine and changing password is not really an option since I want to automate the installation of Hive, Ranger and MySQL from Blueprint .

My blueprint: blueprint.txt

Attila

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Ranger fails to install with Blueprint

@Attila Kanto,

Can you try running these mysql commands before triggering the blueprint

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; 
FLUSH PRIVILEGES;

Thanks,

Aditya

View solution in original post

6 REPLIES 6
Highlighted

Re: Ranger fails to install with Blueprint

@Attila Kanto,

Can you try running these mysql commands before triggering the blueprint

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; 
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; 
FLUSH PRIVILEGES;

Thanks,

Aditya

View solution in original post

Highlighted

Re: Ranger fails to install with Blueprint

Expert Contributor

Thanks, but before triggering the blueprint the mysql is still not installed. MYSQL_SEVER is part of the blueprint and it is installed by Ambari.

Highlighted

Re: Ranger fails to install with Blueprint

@Attila Kanto,

DB pre-requisites need to be met before running the blueprint. Use the same mysql server for hive metastore as well.

You can select "Existing MySQL / MariaDB Database" for hive metastore. For blueprint check "hive_database" in hive-env properties

Highlighted

Re: Ranger fails to install with Blueprint

@Aditya Sirna Is there a way to add the SQL commands to the blueprint, (or reference to a script file) that should be run on MySQL once MySQL has been installed. Without the blueprint, there is no MySQL installed, so the commands should also be part of the blueprint if thats possible.

Highlighted

Re: Ranger fails to install with Blueprint

@Nisha,

I'm not sure if we can add MySQL commands to a blueprint. The idea is to install and setup MySQL server and then trigger the blueprint as Ranger has this as a pre-requisite. If you have a MySQL server installed and set 'create_db_users' as true, then ranger will create the users for you provided you give MySQL's root credentials.

Highlighted

Re: Ranger fails to install with Blueprint

Yes, please make sure to meet DB pre-requisites before creating cluster using blueprint.

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