hive启动服务突然报错:The dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------
·
错误详情:
java.lang.RuntimeException: Error applying authorization policy on hive configuration: The dir: /tmp/hive on HDFS should be writable. Current permissions are: rwx------
at org.apache.hive.service.cli.CLIService.init(CLIService.java:118) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.CompositeService.init(CompositeService.java:59) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.init(HiveServer2.java:230) ~[hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.startHiveServer2(HiveServer2.java:1036) [hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.access$1600(HiveServer2.java:140) [hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2$StartOptionExecutor.execute(HiveServer2.java:1305) [hive-service-3.1.2.jar:3.1.2]
at org.apache.hive.service.server.HiveServer2.main(HiveServer2.java:1149) [hive-service-3.1.2.jar:3.1.2]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
at org.apache.hadoop.util.RunJar.run(RunJar.java:318) [hadoop-common-3.1.3.jar:?]
at org.apache.hadoop.util.RunJar.main(RunJar.java:232) [hadoop-common-3.1.3.jar:?]
Caused by: java.lang.RuntimeException: The dir: /tmp/hive on HDFS should be writable. Current permissions ar2021-12-21T21:07:58,230 INFO [main] metastore.HiveMetaStore: Added admin role in metastore
2021-12-21T21:07:58,235 INFO [main] metastore.HiveMetaStore: Added public role in metastore
2021-12-21T21:07:58,319 INFO [main] metastore.HiveMetaStore: No user is added in admin role, since config is empty
2021-12-21T21:07:58,403 INFO [main] conf.HiveConf: Found configuration file file:/home/lqs/module/hive/conf/hive-site.xml
2021-12-21T21:07:58,663 INFO [main] metastore.HiveMetaStore: Starting DB backed MetaStore Server with SetUGI enabled
2021-12-21T21:07:58,670 INFO [main] metastore.HiveMetaStore: Started the new metaserver on port [9083]...
2021-12-21T21:07:58,670 INFO [main] metastore.HiveMetaStore: Options.minWorkerThreads = 200
2021-12-21T21:07:58,670 INFO [main] metastore.HiveMetaStore: Options.maxWorkerThreads = 1000
2021-12-21T21:07:58,670 INFO [main] metastore.HiveMetaStore: TCP keepalive = true
2021-12-21T21:07:58,670 INFO [main] metastore.HiveMetaStore: Enable SSL = false
报错截图如下:

原因:
是因为hadoop上hdfs文件系统里面的hive文件对于hive没有权限,即hive没有权限对hadoop hdfs上的 /tmp/hive进行写操作。
原因查看:

没有w权限,我们增加权限即可:

点击set就可以了,然后变成这样:

然后去重新启动你的hive服务就可以了。

用命令开启权限:
hadoop fs -chmod 733 /tmp/hive
更多推荐
所有评论(0)