Support Questions

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

Ranger Admin install with access denied error

avatar

I am getting following error while installing ranger-admin from ambari

2016-09-16 14:15:24,498 [JISQL] /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/bin/java -cp /usr/share/java/mysql-connector-java.jar :/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://<host>/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "SELECT version();" SQLException : SQL state: 28000 java.sql.SQLException: Access denied for user 'rangeradmin'@'host' (using password: YES) ErrorCode: 1045 2016-09-16 14:15:24,811 [E] Can't establish connection!! Exiting..

I have already given all required permission to rangeradmin , root , mapped them with host % , localhost what is that i am missing ? Pls help

1 ACCEPTED SOLUTION

avatar

I have resolved the issue ,

In MySQL metastore 'rangeruser'@'ambariservernode' needs grant permission rights for installation to be successfull this is not documented in hortonworks installation doc

GRANT ALL PRIVILEGES ON *.* TO 'rangeruser'@'ambariservernode' WITH GRANT OPTION;

View solution in original post

9 REPLIES 9

avatar
Expert Contributor

Can you follow this document https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.0/bk_Ranger_Install_Guide/content/configuring... Also if you can provide a screenshot or log file, it will be helpful.

avatar

pfa logs rangeradmin-install-logs.txt

I am following below link as per my HDP version https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.4.0/bk_Ranger_Install_Guide/content/ch_overview...

My ambari server and Rangeradmin are on different nodes

Rangeradmin and its mysql metastore are on same node

I am able to run python dba_script successfully on rangeradmin nodes specifying host as localhost

i am also able to run following command successfully from ambari server node , suggesting there is no firewall issue

nc ambaridbhostname 3306

avatar
Expert Contributor

avatar

Yes that is correct

avatar

as logs says permission denied so you need yo go to the db that you configured in ranger and grant the provilleges to root user for ranger admin host with grant options and then try again it will work something like:

grant all on Databases to 'root'@'hostname' identified by 'password' with grant option;

Flush privileges;

avatar

no this is not working

problem is that i am not able to remote connect my mysql instance

these are azure VMs

avatar

any update please

avatar

I have resolved the issue ,

In MySQL metastore 'rangeruser'@'ambariservernode' needs grant permission rights for installation to be successfull this is not documented in hortonworks installation doc

GRANT ALL PRIVILEGES ON *.* TO 'rangeruser'@'ambariservernode' WITH GRANT OPTION;

avatar
Explorer

Think u ,it works!🤗