DBeaver连接Hive错误总结

1.错误1

Required field 'serverProtocolVersion' is unset! Struct:TOpenSessionResp(status:TStatus(statusCode:ERROR_STATUS, infoMessages:[*org.apache.hive.service.cli.HiveSQLException:Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: caimh is not allowed to impersonate root:14:13, org.apache.hive.service.cli.session.SessionManager:createSession:SessionManager.java:419, org.apache.hive.service.cli.session.SessionManager:openSession:SessionManager.java:362, org.apache.hive.service.cli.CLIService:openSessionWithImpersonation:CLIService.java:193, org.apache.hive.service.cli.thrift.ThriftCLIService:getSessionHandle:ThriftCLIService.java:440, org.apache.hive.service.cli.thrift.ThriftCLIService:OpenSession:ThriftCLIService.java:322, org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession:getResult:TCLIService.java:1377, org.apache.hive.service.rpc.thrift.TCLIService$Processor$OpenSession:getResult:TCLIService.java:1362, org.apache.thrift.ProcessFunction:process:ProcessFunction.java:39, org.apache.thrift.TBaseProcessor:process:TBaseProcessor.java:39, org.apache.hive.service.auth.TSetIpAddressProcessor:process:TSetIpAddressProcessor.java:56, org.apache.thrift.server.TThreadPoolServer$WorkerProcess:run:TThreadPoolServer.java:286, java.util.concurrent.ThreadPoolExecutor:runWorker:ThreadPoolExecutor.java:1149, java.util.concurrent.ThreadPoolExecutor$Worker:run:ThreadPoolExecutor.java:624, java.lang.Thread:run:Thread.java:748, *java.lang.RuntimeException:java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: caimh is not allowed to impersonate root:22:8, org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:89, org.apache.hive.service.cli.session.HiveSessionProxy:access$000:HiveSessionProxy.java:36, org.apache.hive.service.cli.session.HiveSessionProxy$1:run:HiveSessionProxy.java:63, java.security.AccessController:doPrivileged:AccessController.java:-2, javax.security.auth.Subject:doAs:Subject.java:422, org.apache.hadoop.security.UserGroupInformation:doAs:UserGroupInformation.java:1746, org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:59, com.sun.proxy.$Proxy37:open::-1, org.apache.hive.service.cli.session.SessionManager:createSession:SessionManager.java:410, *java.lang.RuntimeException:org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: caimh is not allowed to impersonate root:29:7, org.apache.hadoop.hive.ql.session.SessionState:start:SessionState.java:610, org.apache.hadoop.hive.ql.session.SessionState:start:SessionState.java:548, org.apache.hive.service.cli.session.HiveSessionImpl:open:HiveSessionImpl.java:164, sun.reflect.NativeMethodAccessorImpl:invoke0:NativeMethodAccessorImpl.java:-2, sun.reflect.NativeMethodAccessorImpl:invoke:NativeMethodAccessorImpl.java:62, sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java:43, java.lang.reflect.Method:invoke:Method.java:498, org.apache.hive.service.cli.session.HiveSessionProxy:invoke:HiveSessionProxy.java:78, *org.apache.hadoop.ipc.RemoteException:User: caimh is not allowed to impersonate root:49:20, org.apache.hadoop.ipc.Client:call:Client.java:1476, org.apache.hadoop.ipc.Client:call:Client.java:1413, org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker:invoke:ProtobufRpcEngine.java:229, com.sun.proxy.$Proxy30:getFileInfo::-1, org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB:getFileInfo:ClientNamenodeProtocolTranslatorPB.java:776, sun.reflect.NativeMethodAccessorImpl:invoke0:NativeMethodAccessorImpl.java:-2, sun.reflect.NativeMethodAccessorImpl:invoke:NativeMethodAccessorImpl.java:62, sun.reflect.DelegatingMethodAccessorImpl:invoke:DelegatingMethodAccessorImpl.java:43, java.lang.reflect.Method:invoke:Method.java:498, org.apache.hadoop.io.retry.RetryInvocationHandler:invokeMethod:RetryInvocationHandler.java:191, org.apache.hadoop.io.retry.RetryInvocationHandler:invoke:RetryInvocationHandler.java:102, com.sun.proxy.$Proxy31:getFileInfo::-1, org.apache.hadoop.hdfs.DFSClient:getFileInfo:DFSClient.java:2108, org.apache.hadoop.hdfs.DistributedFileSystem$22:doCall:DistributedFileSystem.java:1305, org.apache.hadoop.hdfs.DistributedFileSystem$22:doCall:DistributedFileSystem.java:1301, org.apache.hadoop.fs.FileSystemLinkResolver:resolve:FileSystemLinkResolver.java:81, org.apache.hadoop.hdfs.DistributedFileSystem:getFileStatus:DistributedFileSystem.java:1317, org.apache.hadoop.fs.FileSystem:exists:FileSystem.java:1426, org.apache.hadoop.hive.ql.session.SessionState:createRootHDFSDir:SessionState.java:708, org.apache.hadoop.hive.ql.session.SessionState:createSessionDirs:SessionState.java:654, org.apache.hadoop.hive.ql.session.SessionState:start:SessionState.java:586], errorCode:0, errorMessage:Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: caimh is not allowed to impersonate root), serverProtocolVersion:null)

这是由于hive驱动版本的问题,删除驱动版本,从Linux下载hive驱动包hive-jdbc-2.3.6-standalone.jar

DBeaver连接Hive错误总结_第1张图片

参考:https://blog.csdn.net/weixin_43215250/article/details/88185442

参考:https://blog.csdn.net/dkl12/article/details/81381122

2.错误2

org.apache.hadoop.ipc.RemoteException:User: caimh is not allowed to impersonate caimh

  • 修改hadoop 配置文件 etc/hadoop/core-site.xml,加入如下配置项,重启hadoop集群
  
    hadoop.proxyuser.caimh.hosts
    *
  
  
    hadoop.proxyuser.caimh.groups
    *
  

3.启动hive2服务

[caimh@server01 bin]$ ./hive --service hiveserver2 &
[2] 28558

 

你可能感兴趣的:(Hive)