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.

HDP 2.5 Ranger Audit is not working throws unable to connect Audit Store

HDP 2.5 Ranger Audit is not working throws unable to connect Audit Store

New Contributor

I have installed Ranger and enabled HDFS,YARN, HIVE and ATLAS ranger plugins,

11298-ranger-access-mananger.png

Access Manager shows the default policies applied to HDFS,YARN,HIVE and ATLAS. When I click on the "Audit" tab, I am getting exception,

11299-ranger-audit-error.png

I have checked the ranger catalina.out log file and found the following error stacktrace,

Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database! Error Code: 0 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:316) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:346) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:307) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:434) at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:217) at org.eclipse.persistence.sessions.server.ExternalConnectionPool.startUp(ExternalConnectionPool.java:146) at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:488) at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:755) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:241) at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:685) ... 108 more Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database! at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123) ... 118 more Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)

I have tested the connection in the Ambari UI and got success,

11300-ranger-db-test-connection.png

Couple of timer restarted Ranger and Ambari but no use. Please help.

Thanks...

1 REPLY 1
Highlighted

Re: HDP 2.5 Ranger Audit is not working throws unable to connect Audit Store

Super Guru

Can you please setup your ranger audit plugin. the screen shot you have shown is for ranger admin and the error you are getting is related to ranger audits (on solr/ambari infra)

here is the setup info

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.0/bk_security/content/ranger_audit_settings.h...

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