Support Questions

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

Getting error when connecting to hive CLI from "ROOT" user in kerberised cluster even I have root keytab and principal

avatar
Rising Star

Hello Everyone ,

Can you please add your inputs on my below concern with HIVE vs Root user while I am unable to run queries

I have my kerberised cluster where I created keytab and principal for ROOT user .

From one of my edge nodes , When I connect with beeline as Root user its connecting but while running the Insert Queries its failing with below exception.

main : run as user is root

main : requested yarn user is root

Running as root is not allowed Failing this attempt. Failing the application

To check I have tried to connect hive CLI , same exception got

main : run as user is root

main : requested yarn user is root

Running as root is not allowed Failing this attempt. Failing the application

root@hdp-24-edge03.dev[us-east-1]:~# hive

WARNING: Use "yarn jar" to launch YARN applications. Logging initialized using configuration in file:/etc/hive/2.3.4.33-1/0/hive-log4j.properties Exception in thread "main" java.lang.RuntimeException: org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. Application application_1467717854824_0105 failed 2 times due to AM Container for appattempt_1467717854824_0105_000002 exited with exitCode: -1000 For more detailed output, check application tracking page:http://hdp-iaas-dev24-control01.dev.na1.phsdp.com:8088/cluster/app/application_1467717854824_0105Then, click on links to logs of each attempt. Diagnostics: Application application_1467717854824_0105 initialization failed (exitCode=255) with output: main : command provided 0 main : run as user is root main : requested yarn user is root Running as root is not allowed Failing this attempt. Failing the application. at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:507) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:680) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:624) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hadoop.util.RunJar.run(RunJar.java:221) at org.apache.hadoop.util.RunJar.main(RunJar.java:136) Caused by: org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. Application application_1467717854824_0105 failed 2 times due to AM Container for appattempt_1467717854824_0105_000002 exited with exitCode: -1000 For more detailed output, check application tracking page:http://hdp-iaas-dev24-control01.dev.na1.phsdp.com:8088/cluster/app/application_1467717854824_0105Then, click on links to logs of each attempt. Diagnostics: Application application_1467717854824_0105 initialization failed (exitCode=255) with output: main : command provided 0

main : run as user is root

main : requested yarn user is root

Running as root is not allowed Failing this attempt. Failing the application. at org.apache.tez.client.TezClient.waitTillReady(TezClient.java:730) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:217) at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:117) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:504) ... 8 more

1 ACCEPTED SOLUTION

avatar
Guru

Avoid using root user to run jobs in kerberized cluster. There is a configuration to set minimum uid and unless you have specific requirement to run as root, don't use it. The parameter is min.user.id and default is 1000. Linux super users generally end up below 1000 uids.

View solution in original post

2 REPLIES 2

avatar
Guru

Avoid using root user to run jobs in kerberized cluster. There is a configuration to set minimum uid and unless you have specific requirement to run as root, don't use it. The parameter is min.user.id and default is 1000. Linux super users generally end up below 1000 uids.

avatar
Rising Star

Hi Ravi ,

Thanks for your comeback !

Minimum user ID for submitting job in my case is '500' .

I have this doubt -- configuration for UID showing '0' for disallowing root and '1000' to disallow all super users.

So If I want to run hive CLI by "ROOT" user what should I mention since Root UID =0

id root uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)

Thanks,

Hari