You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ranger.apache.org by Uday Kale <ud...@gmail.com> on 2016/09/21 21:21:14 UTC

sampleapp plugin DB audit error

Hi,

I am testing the sampleapp plugin supplied with Ranger. I am able to define
servicedef, define a service instance, and create policies from Ranger UI,
and also able to audit the accesses into HDFS and log4j logger.

I am hitting this error when enabling audit to db...

2016-09-21 14:19:16,968 [org.apache.ranger.audit.queue.AuditBatchQueue0]
ERROR org.apache.ranger.audit.destination.DBAuditDestination
(DBAuditDestination.java:198) - Error connecting audit database.
dbURL=jdbc:mysql://take1.fyre.ibm.com/ranger_audit, dbUser=rangerlogger
javax.persistence.PersistenceException: No Persistence provider for
EntityManager named xa_server
        at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:85)
        at
org.apache.ranger.audit.destination.DBAuditDestination.connect(DBAuditDestination.java:180)
        at
org.apache.ranger.audit.destination.DBAuditDestination.getTransaction(DBAuditDestination.java:255)
        at
org.apache.ranger.audit.destination.DBAuditDestination.beginTransaction(DBAuditDestination.java:264)
        at
org.apache.ranger.audit.destination.DBAuditDestination.log(DBAuditDestination.java:87)
        at
org.apache.ranger.audit.queue.AuditBatchQueue.runDoAs(AuditBatchQueue.java:320)
        at
org.apache.ranger.audit.queue.AuditBatchQueue$1.run(AuditBatchQueue.java:217)
        at
org.apache.ranger.audit.queue.AuditBatchQueue$1.run(AuditBatchQueue.java:215)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:360)
        at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1637)
        at
org.apache.ranger.audit.queue.AuditBatchQueue.run(AuditBatchQueue.java:223)
        at java.lang.Thread.run(Thread.java:745)


I have provided the necessary info in conf/ranger-sampleapp-audit.xml as
described in the README. I am able to insert a row using the rangerlogger
user name and password from the xml, so it is not a permissions issue.

Appreciate any help addressing this error.

Regards,
Uday.