使用beeline 连接客户端报错

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hjh1653267911/article/details/78952902
当hive数据仓库搭建起来了,同时将hiveserver2 服务器端已启动(命令:./hiveserver2) ,使用 beeline   命令启动客户端  报一下这个错误: 
Beeline version 1.2.1 by Apache Hive
beeline>  !connect jdbc:hive2://192.168.173.128:10000 
Connecting to jdbc:hive2://192.168.173.128:10000
Enter username for jdbc:hive2://192.168.173.128:10000: root
Enter password for jdbc:hive2://192.168.173.128:10000: 
Error: Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=EXECUTE, inode="/tmp":hadoop:supergroup:drwx------
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkFsPermission(FSPermissionChecker.java:271)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:257)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:208)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:171)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:6547)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:4182)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getFileInfo(NameNodeRpcServer.java:881)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getFileInfo(ClientNamenodeProtocolServerSideTranslatorPB.java:821)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:975)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2040)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2036)
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:1692)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2034) (state=,code=0)

0: jdbc:hive2://192.168.173.128:10000 (closed)>  


解决办法:   

这里明显就是因为权限的问题,而我这里使用是yarn 集群的hadoop  ,hadoop集群的用户( hadoop )是linux系统的子用户 。所以使用beeline登录时,用户名应该是hadoop 不是root ,即: Enter username for jdbc:hive2://192.168.173.128:10000: root  这里输入用户名时改为: hadoop,便不会再报错了


展开阅读全文

没有更多推荐了,返回首页