[ 
https://issues.apache.org/jira/browse/RANGER-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14310609#comment-14310609
 ] 

Gautam Borad commented on RANGER-224:
-------------------------------------

[~robinlin], since the {{jdbc.password}} is set to '_' we will have to check 
the jceks file and verify it has right password against the 
{{policydb.jdbc.password}} alias.

# Get the keystore file name from the install.properties ( default : 
$app_home/WEB-INF/classes/conf/.jceks/rangeradmin.jceks )
# {{cd $RANGER_INSTALL_DIR}}
# Run the credential api to get the value for key : {{policydb.jdbc.password}}
{noformat}java -cp "cred/lib/*" org.apache.ranger.credentialapi.buildks get 
"policydb.jdbc.password" -provider 
jceks://file<absolute_path_to_keystore_filename> {noformat}
For Eg : {noformat}java -cp "cred/lib/*" 
org.apache.ranger.credentialapi.buildks get "policydb.jdbc.password" -provider 
jceks://file/root/ranger/ranger-0.4.0-admin/ews/webapp/WEB-INF/classes/conf/.jceks/rangeradmin.jceks
{noformat}

Note: You can list the aliases present in a jceks file using the following 
command 
{noformat}
java -cp "cred/lib/*" org.apache.ranger.credentialapi.buildks list -provider 
jceks://file<absolute_path_to_keystore_filename> 
{noformat}

> Ranger admin can not access to mysql? 
> --------------------------------------
>
>                 Key: RANGER-224
>                 URL: https://issues.apache.org/jira/browse/RANGER-224
>             Project: Ranger
>          Issue Type: Bug
>    Affects Versions: 0.4.1
>         Environment: OS: Ubuntu14.04 server 64bit
> DB: 5.5.40-MariaDB-0ubuntu0.14.04.1
>            Reporter: robinlin
>            Priority: Blocker
>
> Hi :
> I installed Ranger by following steps in
> https://cwiki.apache.org/confluence/display/RANGER/Ranger+Installation+Guide
> but there is a exception when I am trying to login via the web page.
> And the exception message is...
> java.sql.SQLException: Access denied for user 'rangeradmin'@'localhost' 
> (using password: YES)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1094)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4226)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4158)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
>         at 
> com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
>         at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)
>         at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2508)
>         at 
> com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2541)
>         at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2323)
>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
>         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>         at sun.reflect.GeneratedConstructorAccessor49.newInstance(Unknown 
> Source)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
>         at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
>         at 
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
>         at net.sf.log4jdbc.DriverSpy.connect(DriverSpy.java:728)
>         at 
> com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
>         at 
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
>         at 
> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
>         at 
> com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
>         at 
> com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
>         at 
> com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
>         at 
> com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
>         at 
> com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
> Please help me with this, thanks in advance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to