Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (2)
avatar
Contributor

PROBLEM: Unable to run insert query from Ambari Hive View with Kerberos enabled.

Error: Error in /var/log/ambari-server/hive-next-view/hive-view.log

at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.tez.TezTask
	at org.apache.hive.jdbc.HiveStatement.waitForOperationToComplete(HiveStatement.java:348)
	at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:251)
	at org.apache.ambari.view.hive2.HiveJdbcConnectionDelegate.execute(HiveJdbcConnectionDelegate.java:49)
	at org.apache.ambari.view.hive2.actor.StatementExecutor.runStatement(StatementExecutor.java:87)
	at org.apache.ambari.view.hive2.actor.StatementExecutor.handleMessage(StatementExecutor.java:70)
	at org.apache.ambari.view.hive2.actor.HiveActor.onReceive(HiveActor.java:38)
	at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)

Corresponding Error in RM UI Application_xxxx_xxx Diagnostics:

Diagnostics:
Application application_1494540056219_0008 failed 2 times due to AM Container for
appattempt_1494540056219_0008_000002 exited with exitCode: -1000
For more detailed output, check the application tracking page:
http://space3.example.com:8088/cluster/app/application_1494540056219_0008 Then click on links to logs of each attempt.
Diagnostics: Application application_1494540056219_0008 initialization failed (exitCode=255) with output: main :
command provided 0
main : run as user is admin
main : requested yarn user is admin
User admin not foundFailing this attempt.
Failing the application.

ROOT CAUSE: Since Kerberos is enabled and "hive.server2.enable.doAs" property in Hive is true which is "Run as end user instead of Hive user is true", it looks for end user to be present locally in every Node Managers.

SOLUTION: Create end user running the hive queries locally or have it present via AD/LDAP.

1,073 Views