[root@mihaoyu151 conf]# beeline -u jdbc:hive2://192.168.133.151:10000
which: no hbase in(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop26/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
scan complete in 1ms
Connecting to jdbc:hive2://192.168.133.151:10000
Error: Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.security.AccessControlException: Permissio denied: user=anonymous, access=EXECUTE, inode="/tmp":root:supergroup:drwxrwx---
at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.checkFsPermission(DefaultAuthorizationProvider.java:279)
at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.check(DefaultAuthorizationProvider.java:260)
at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.checkTraverse(DefaultAuthorizationProvider.java:201)
at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.checkPermission(DefaultAuthorizationProvider.java:154)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:152)
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:3877)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkPermission(FSNamesystem.java:6797)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getFileInfo(FSNamesystem.java:4396)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getFileInfo(NameNodeRpcServer.java:910)
at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.getFileInfo(AuthorizationProviderProxyClientProtocol.java:53)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getFileInfo(ClientNamenodeProtocolServerSideTranslatorPB.java861)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.ava)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2281)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2277)
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:1920)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2275)(state=,code=0)
Beeline version 1.1.0-cdh5.14.2 by Apache Hive
beeline>
解决办法
[root@mihaoyu151 conf]# hadoop fs -chmod -R 777 /*21/11/09 11:01:21 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
chmod: `/bin': No such file or directory
chmod: `/boot': No such file or directory
chmod: `/dev': No such file or directory
chmod: `/etc': No such file or directory
chmod: `/home': No such file or directory
chmod: `/lib': No such file or directory
chmod: `/lib64': No such file or directory
chmod: `/media': No such file or directory
chmod: `/mnt': No such file or directory
chmod: `/opt': No such file or directory
chmod: `/proc': No such file or directory
chmod: `/root': No such file or directory
chmod: `/run': No such file or directory
chmod: `/sbin': No such file or directory
chmod: `/srv': No such file or directory
chmod: `/sys': No such file or directory
chmod: `/usr': No such file or directory
chmod: `/var': No such file or directory
[root@mihaoyu151 conf]# beeline -u jdbc:hive2://192.168.133.151:10000
which: no hbase in(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop26/sbin:/opt/soft/hadoop260/bin:/opt/soft/jdk180/bin:/opt/soft/hadoop260/sbin:/opt/soft/hadoop260/bin:/opt/soft/zookeeper345/bin:/opt/soft/hive110/bin)
scan complete in 1ms
Connecting to jdbc:hive2://192.168.133.151:10000
Connected to: Apache Hive (version 1.1.0-cdh5.14.2)
Driver: Hive JDBC (version 1.1.0-cdh5.14.2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.1.0-cdh5.14.2 by Apache Hive
0: jdbc:hive2://192.168.133.151:10000> show databases;
INFO : Compiling command(queryId=root_20211109110101_d9435f2b-d37f-4d00-bd9c-7bedefa15ddd): show databases
INFO : Semantic Analysis Completed
INFO : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)
INFO : Completed compiling command(queryId=root_20211109110101_d9435f2b-d37f-4d00-bd9c-7bedefa15ddd); Time taken: 0.567 seconds
INFO : Concurrency mode is disabled, not creating a lock manager
INFO : Executing command(queryId=root_20211109110101_d9435f2b-d37f-4d00-bd9c-7bedefa15ddd): show databases
INFO : Starting task [Stage-0:DDL]in serial mode
INFO : Completed executing command(queryId=root_20211109110101_d9435f2b-d37f-4d00-bd9c-7bedefa15ddd); Time taken: 0.027 seconds
INFO : OK
+----------------+--+
| database_name |
+----------------+--+
| default |
+----------------+--+
1 row selected (0.932 seconds)0: jdbc:hive2://192.168.133.151:10000>
错误日志[root@mihaoyu151 conf]# beeline -u jdbc:hive2://192.168.133.151:10000which: no hbase in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/opt/soft/jdk180/bin:/opt/soft/zookeeper345/bin:/opt/soft/hadoop26/sbin:/opt/soft/hadoop260/bin: