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.

Unknown error in create role in Hue with Sentry

Highlighted

Unknown error in create role in Hue with Sentry

Explorer

Hi all,

 

- CDH 5.7.1
- Hive 1.1.0
- Impala 2.5.0
- Sentry service Enable

- NO LDAP

- NO Kerberos

I have installed and configured Sentry Service from CM.
In HUE i have created user "hive"and relative group ("hive") with all privilege (hue privilege)
When i try to create a new role i receveid thi error:

 

 hive         ERROR    could not create role
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/lib/hue/apps/security/src/security/api/hive.py", line 176, in create_role
    api.create_sentry_role(role['name'])
  File "/opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/lib/hue/desktop/libs/libsentry/src/libsentry/api.py", line 49, in decorator
    raise e
SentryException: Unknown error for request: TCreateSentryRoleRequest(protocol_version:2, requestorUserName:hive, roleName:prova), message: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.

 

hue_add_role1.JPG

 

hue_add_role1_error.JPG

Have you any suggestions?

 

 

thanks

 

3 REPLIES 3

Re: Unknown error in create role in Hue with Sentry

Explorer

I try to create role from beeline and receveid the same error

 

 

command:

 

0: jdbc:hive2://bda1node04:10000> create role role1;

 

error:

 

 

2016-11-03 14:43:32,563 INFO  org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-55]: </PERFLOG method=Driver.execute start=1478180612438 end=1478180612563 duration=125 from=org.apache.hadoop.hive.ql.Driver>
2016-11-03 14:43:32,563 INFO  org.apache.hadoop.hive.ql.Driver: [HiveServer2-Background-Pool: Thread-55]: Completed executing command(queryId=hive_20161103144343_efb717ff-b63c-408c-90f6-a93944eede95); Time taken: 0.125 seconds
2016-11-03 14:43:32,563 INFO  org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-55]: <PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver>
2016-11-03 14:43:32,563 INFO  org.apache.hadoop.hive.ql.log.PerfLogger: [HiveServer2-Background-Pool: Thread-55]: </PERFLOG method=releaseLocks start=1478180612563 end=1478180612563 duration=0 from=org.apache.hadoop.hive.ql.Driver>
2016-11-03 14:43:32,564 ERROR org.apache.hive.service.cli.operation.Operation: [HiveServer2-Background-Pool: Thread-55]: Error running hive query:
org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.SentryGrantRevokeTask. Unknown error for request: TCreateSentryRoleRequest(protocol_version:2, requestorUserName:hive, roleName:role1), message: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.. Server Stacktrace: javax.jdo.JDODataStoreException: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.
        at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:451)
        at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:732)
        at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:752)
        at org.apache.sentry.provider.db.service.persistent.SentryStore.createSentryRole(SentryStore.java:316)
        at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.create_sentry_role(SentryPolicyStoreProcessor.java:230)
        at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$create_sentry_role.getResult(SentryPolicyService.java:893)
        at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$create_sentry_role.getResult(SentryPolicyService.java:878)
        at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
        at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
        at org.apache.sentry.provider.db.service.thrift.SentryProcessorWrapper.process(SentryProcessorWrapper.java:35)
        at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
        at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
NestedThrowablesStackTrace:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 3072 bytes
        at sun.reflect.GeneratedConstructorAccessor21.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
        at com.mysql.jdbc.Util.getInstance(Util.java:360)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2526)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2484)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:848)
        at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:742)
        at com.jolbox.bonecp.StatementHandle.execute(StatementHandle.java:300)
        at org.datanucleus.store.rdbms.table.AbstractTable.executeDdlStatement(AbstractTable.java:760)
        at org.datanucleus.store.rdbms.table.TableImpl.createIndices(TableImpl.java:648)
        at org.datanucleus.store.rdbms.table.TableImpl.createConstraints(TableImpl.java:422)
        at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.performTablesValidation(RDBMSStoreManager.java:3487)
        at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.addClassTablesAndValidate(RDBMSStoreManager.java:3218)
        at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2869)
        at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:122)
        at org.datanucleus.store.rdbms.RDBMSStoreManager.addClasses(RDBMSStoreManager.java:1606)
        at org.datanucleus.store.AbstractStoreManager.addClass(AbstractStoreManager.java:954)
        at org.datanucleus.store.rdbms.RDBMSStoreManager.getDatastoreClass(RDBMSStoreManager.java:680)

Re: Unknown error in create role in Hue with Sentry

How about you ask the question in the Sentry forum? (as this is a command
line problem)

http://community.cloudera.com/t5/Security-Apache-Sentry/bd-p/Security

Re: Unknown error in create role in Hue with Sentry

Explorer

Hi Romainr,

 

initially the problem seemed to be on hue.

I close this post and create new in Sentry section.

 

Thanks