Support Questions

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

Unable to create role in sentry

avatar
Contributor

Hi All,

 

I enabled sentry and all services are healthy but unable to create roles and not getting

 

0: jdbc:hive2://wa1cog3mgmt2200.cdp.centuryli> CREATE ROLE huesuperrole;
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
INFO : Compiling command(queryId=hive_20220731105224_c56c786a-bfaf-4270-a2a0-e62936b67777): CREATE ROLE huesuperrole
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO : Completed compiling command(queryId=hive_20220731105224_c56c786a-bfaf-4270-a2a0-e62936b67777); Time taken: 2.529 seconds
INFO : Executing command(queryId=hive_20220731105224_c56c786a-bfaf-4270-a2a0-e62936b67777): CREATE ROLE huesuperrole
INFO : Starting task [Stage-0:DDL] in serial mode
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs
printed operations logs
going to print operations logs

ERROR : FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. null
INFO : Completed executing command(queryId=hive_20220731105224_c56c786a-bfaf-4270-a2a0-e62936b67777); Time taken: 184.819 seconds
printed operations logs
Getting log thread is interrupted, since query is done!
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. null (state=08S01,code=1)
java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. null
at org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:381)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:260)
at org.apache.hive.beeline.Commands.executeInternal(Commands.java:984)
at org.apache.hive.beeline.Commands.execute(Commands.java:1180)
at org.apache.hive.beeline.Commands.sql(Commands.java:1109)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:1331)
at org.apache.hive.beeline.BeeLine.execute(BeeLine.java:1188)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:1027)
at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:526)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:508)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:313)
at org.apache.hadoop.util.RunJar.main(RunJar.java:227)
0: jdbc:hive2://wa1cog3mgmt2200.cdp.centuryli>

9 REPLIES 9

avatar
Super Guru

@mohammad_shamim ,

 

Any errors or warnings on the Sentry logs?

What about the HS2 logs?

 

Cheers

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Hi , Please find the below HS2 logs below. 

 

HiveConf of name hive.sentry.conf.url does not exist


2022-08-01 01:42:57,251 WARN org.apache.thrift.transport.TIOStreamTransport: [pool-9-thread-192]: Error closing output stream.
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:118) ~[?:1.8.0_181]
at java.net.SocketOutputStream.write(SocketOutputStream.java:155) ~[?:1.8.0_181]
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) ~[?:1.8.0_181]
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) ~[?:1.8.0_181]
at java.io.FilterOutputStream.close(FilterOutputStream.java:158) ~[?:1.8.0_181]
at org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:110) [hive-exec-2.1.1-cdh6.3.4.jar:2.1.1-cdh6.3.4]

avatar
Super Guru

Unfortunately, this doesn't tell much.

Any luck with the Sentry logs?

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Below is the sentry log

root@wa1cog3mgmt2200:/var/log/sentry >vi hadoop-cmf-sentry-SENTRY_SERVER-wa1cog3mgmt2200.cdp.centurylink.com.log.out
at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:120)
at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:218)
at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1923)
at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1778)
at org.datanucleus.ExecutionContextThreadedImpl.persistObject(ExecutionContextThreadedImpl.java:217)
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:724)
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:749)
at org.apache.sentry.provider.db.service.model.MAuthzPathsMapping.makePersistent(MAuthzPathsMapping.java:185)
at org.apache.sentry.provider.db.service.persistent.SentryStore.lambda$persistFullPathsImage$52(SentryStore.java:3413)
at org.apache.sentry.provider.db.service.persistent.TransactionManager.executeTransaction(TransactionManager.java:123)
at org.apache.sentry.provider.db.service.persistent.TransactionManager$1.call(TransactionManager.java:192)
at org.apache.sentry.provider.db.service.persistent.TransactionManager$ExponentialBackoff.execute(TransactionManager.java:233)
at org.apache.sentry.provider.db.service.persistent.TransactionManager.executeTransactionWithRetry(TransactionManager.java:188)
at org.apache.sentry.provider.db.service.persistent.SentryStore.persistFullPathsImage(SentryStore.java:3386)
at org.apache.sentry.provider.db.service.persistent.HMSFollower.createFullSnapshot(HMSFollower.java:423)
at org.apache.sentry.provider.db.service.persistent.HMSFollower.syncupWithHms(HMSFollower.java:237)
at org.apache.sentry.provider.db.service.persistent.HMSFollower.run(HMSFollower.java:198)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2022-08-01 01:45:31,274 WARN org.apache.sentry.provider.db.service.persistent.TransactionManager: Retrying transaction 10/11 times
2022-08-01 01:45:31,274 WARN org.apache.sentry.provider.db.service.persistent.TransactionManager: Sleeping for 33587 milliseconds before retrying

 

avatar
Super Guru

Could you please provide the full stack trace? The one above is incomplete.

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Hi, Please download full log by using below mentioned link. 

 

https://drive.google.com/file/d/1WmOuSBflsj73xYAyxvjJtMlz-2uxBonc/view?usp=sharing

avatar
Super Guru

What's the version of your MySQL database? It seems you're using a version that's not compatible with Sentry.

 

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Contributor

Hi,

Please find the version details below.

root@wa1cog3mgmt2200:/var/log/sentry >mysql -V
mysql Ver 14.14 Distrib 5.7.38, for Linux (x86_64) using EditLine wrapper
root@wa1cog3mgmt2200:/var/log/sentry >sentry -v
WARNING: Use "yarn jar" to launch YARN applications.
Apache Sentry 2.1.0-cdh6.3.4 ,built from commit#Unknown ,compiled by jenkins with source checksum 6fcac5ae238eb7680948756228051c52
root@wa1cog3mgmt2200:/var/log/sentry >

avatar
New Contributor

So do I