Caused by: org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.Runti

el/2024/4/13 13:51:12

执行Hive HPLSQL是遇到下列问题:# hplsql -e "SELECT * FROM  pokes  LIMIT 1"


Caused by: org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.security.AccessControlException: Permission denied: user=hive, access=EXECUTE, inode="/tmp/hive":root:supergroup:drwxrwx---
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:259)
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:205)
    at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190)
    at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1698)
    at org.apache.hadoop.hdfs.server.namenode.FSDirStatAndListingOp.getFileInfo(FSDirStatAndListingOp.java:108)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:3817)
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getFileInfo(NameNodeRpcServer.java:1005)
    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getFileInfo(ClientNamenodeProtocolServerSideTranslatorPB.java:843)
    at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
    at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:969)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2049)
    at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2045)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
    at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2043)

    at org.apache.hive.service.cli.session.SessionManager.createSession(SessionManager.java:336)
    at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:279)
    at org.apache.hive.service.cli.CLIService.openSessionWithImpersonation(CLIService.java:189)
    at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:414)
    at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:310)
    at org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1377)
    at org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1362)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
    at org.apache.hive.service.auth.TSetIpAddressProcessor.process(TSetIpAddressProcessor.java:56)
    at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

    at java.lang.Thread.run(Thread.java:745)



问题原因:相关HDFS文件权限问题

解决方法:

   方法1:可以给当前用户的HDFS文件授权

   方法2:修改HADOOP配置文件hdfs-site.xml,修改dfs.permissions 数据为false。

  <property>
    <name>dfs.permissions</name>
    <value>false</value>
  </property>




http://www.ngui.cc/el/4994263.html

相关文章

hive2.1.insert、update、delete操作测试

hive2.1.insert、update、delete操作测试 在HIve缺省配置设置中,转换管理器不支持update跟delete操作。 若要Hive支持update操作跟delete操作,必须额外再配置一些东西,详细见: https://cwiki.apache.org/confluence/display/Hive/Hive+Transactions Configuration M…

https://packages.elastic.co/elasticsearch/2.3/centos/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22

操作系统CENTOS # yum install xinetd Loaded plugins: fastestmirror, refresh-packagekit, security Setting up Install Process Loading mirror speeds from cached hostfile * base: mirrors.btte.net * extras: mirrors.btte.net * updates: mirrors.btte.net pgdg94…

HIVE2:ERROR [main]: ql.Driver (:()) - FAILED: Execution Error, return code 1 from org.apache.hadoop.

在Hive2.1 on Tez环境中运行select count(*) from students;时,遇到 ERROR [main]: ql.Driver (:()) - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask 查看hive日志,具体问题是: 2016-12-20T17:38:50,298 INFO [Tez session…

park将数据写入hbase以及从hbase读取数据

本文将介绍 1、Spark如何利用saveAsHadoopDataset和saveAsNewAPIHadoopDataset将RDD写入Hbase 2、spark从hbase中读取数据并转化为RDD 操作方式为在eclipse本地运行spark连接到远程的hbase。 Java版本&#xff1a;1.7.0 Scala版本&#xff1a;2.10.4 zookeeper版本&#…

Hue 安装问题django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: libmysqlclient.so

问题&#xff1a; [rootmaster hue-3.11.0]# build/env/bin/hue syncdb Traceback (most recent call last): File "build/env/bin/hue", line 9, in <module> load_entry_point(desktop3.11.0, console_scripts, hue)() File "/sdc3/hue-3.11.0/deskto…

centos7 能联通内网,但是不能访问外网网页问题

需要把连接配置文件&#xff08;/etc/sysconfig/network-scripts/ifcfg-Shared_Wired_Connection&#xff09;内容中&#xff1a; BOOTPROTOnone 改为 BOOTPROTOstatic 或 BOOTPROTOdhcp 即可。 然后&#xff0c;重启网络&#xff1a;service network restart 注&#xf…

centos install scipy 问题:File scipy/linalg/setup.py, line 20, in configuration raise NotFoundE

依赖包&#xff1a; pyparsing、dateutil、scipy、numpy、libpng 1.2 (or later)、freetype 1.4 (or later) 安装pyparsing&#xff1a; # pip install pyparsing 安装numpy&#xff1a; # pip install numpy 安装dateutil&#xff1a; # pip install Python-dateutil 安装scip…

Spark集群某些worker无法停止的原因分析和解决

今天想停止spark集群&#xff0c;发现执行stop-all.sh的时候spark的相关进程都无法停止。提示&#xff1a; no org.apache.spark.deploy.master.Master to stop no org.apache.spark.deploy.worker.Worker to stop 上网查了一些资料&#xff0c;再翻看了一下stop-all.sh&…

CentOS 6.6 升级GCC G++ (当前最新版本为v6.1.0) (完整)

---恢复内容开始--- CentOS 6.6 升级GCC G (当前最新GCC/G版本为v6.1.0) 没有便捷方式, yum update.... yum install 或者 添加yum 的 repo 文件 也不行, 只能更新到 4.4.7! then, 只能手动编译安装了,那么开始第一步下载源代码吧,GO! 1、 获取安装包并解压 wget ht…

java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$NoNodeE

写了一个storm集成kfaka的程序&#xff0c;kafkaSpout消费的数据作为storm的数据源。运行报错如下&#xff1a; java.lang.RuntimeException: java.lang.RuntimeException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode NoNode for /brokers/topi…