报错代码:
[main]: Error starting HiveServer2 on attempt 29, will retry in 60000ms
java.lang.RuntimeException: Error applying authorization policy on hive configuration: java.io.IOException: Permission denied
at org.apache.hive.service.cli.CLIService.init(CLIService.java:113) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.CompositeService.init(CompositeService.java:59) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:136) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:579) [hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.server.HiveServer2.access$700(HiveServer2.java:94) [hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:827) [hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:696) [hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
at org.apache.hadoop.util.RunJar.run(RunJar.java:313) [hadoop-common-3.0.0-cdh6.3.2.jar:?]
at org.apache.hadoop.util.RunJar.main(RunJar.java:227) [hadoop-common-3.0.0-cdh6.3.2.jar:?]
Caused by: java.lang.RuntimeException: java.io.IOException: Permission denied
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:587) ~[hive-exec-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:540) ~[hive-exec-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.cli.CLIService.applyAuthorizationConfigPolicy(CLIService.java:125) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
at org.apache.hive.service.cli.CLIService.init(CLIService.java:110) ~[hive-service-2.1.1-cdh6.3.2.jar:2.1.1-cdh6.3.2]
... 12 more
Caused by: java.io.IOException: Permission denied
解决方法:
sudo chown -R hive:hive /tmp/hive
sudo chmod -R 755 /tmp/hive