报错日志:
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
Logging initialized using configuration in file:/etc/hive/2.6.1.0-129/0/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. Application application_1531720258050_0006 failed 2 times due to AM Container for appattempt_1531720258050_0006_000002 exited with exitCode: -1000
For more detailed output, check the application tracking page: http://c2eng48:8088/cluster/app/application_1531720258050_0006 Then click on links to logs of each attempt.
Diagnostics: Application application_1531720258050_0006 initialization failed (exitCode=255) with output: main : command provided 0
main : run as user is test
main : requested yarn user is test
User test not found
Failing this attempt. Failing the application.
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:560)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
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:233)
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: org.apache.tez.dag.api.SessionNotRunning: TezSession has already shutdown. Application application_1531720258050_0006 failed 2 times due to AM Container for appattempt_1531720258050_0006_000002 exited with exitCode: -1000
分析:
已经在KDC服务器上创建了test用户,为什么还会报错了?
在一个非安全的集群里,Hadoop会把计算用的container分发到集群的所有节点上,并且用已经存在的账号或替代账号例如yarn或mapred用户来启动这些container。但是在一个安全集群里,container必须使用你提交的用户名来分发和启动,所以,这个错误是由于你仅仅添加了KDC里面的test用户这个pricipal,而没有在所有节点建立test账户。所以container的执行器无法启动AM或者Mapper或Reducer。所以很简单,
你需要在所有节点运行以下命令:useradd
test
问题即可解决