Hive:hive is not allowed to impersonate anonymous
2017-08-24 09:35
381 查看
1、用kettle通过jdbc连接hiveserver2的时候抛出异常
2、原因:hive不允许匿名用户访问
3、解决办法:
在hdfs的core-site.xml文件添加两个属性
重启hdfs、hive、yarn,MR
Exception in thread "main" 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: hadoop is not allowed to impersonate anonymous at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:258) at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:249) at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:579) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:167) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:215) at client.main(client.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140) Caused by: 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: hadoop is not allowed to impersonate anonymous at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:324) at org.apache.hive.service.cli.CLIService.openSessionWithImpersonation(CLIService.java:187) at org.apache.hive.service.cli.thrift.ThriftCLIService.getSessionHandle(ThriftCLIService.java:424) at org.apache.hive.service.cli.thrift.ThriftCLIService.OpenSession(ThriftCLIService.java:318) at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1257) at org.apache.hive.service.cli.thrift.TCLIService$Processor$OpenSession.getResult(TCLIService.java:1242) 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) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate anonymous at org.apache.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:89) at org.apache.hive.service.cli.session.HiveSessionProxy.access$000(HiveSessionProxy.java:36) at org.apache.hive.service.cli.session.HiveSessionProxy$1.run(HiveSessionProxy.java:63) 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.hive.service.cli.session.HiveSessionProxy.invoke(HiveSessionProxy.java:59) at com.sun.proxy.$Proxy35.open(Unknown Source) at org.apache.hive.service.cli.session.SessionManager.openSession(SessionManager.java:315) ... 12 more Caused by: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate anonymous at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:554) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:489) at org.apache.hive.service.cli.session.HiveSessionImpl.open(HiveSessionImpl.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2、原因:hive不允许匿名用户访问
3、解决办法:
在hdfs的core-site.xml文件添加两个属性
hadoop.proxyuser.hive.groups=* hadoop.proxyuser.hive.hosts=*
重启hdfs、hive、yarn,MR
相关文章推荐
- Hive2- User root is not allowed to impersonate anonymous
- User root is not allowed to impersonate anonymous
- User root is not allowed to impersonate anonymous
- User root is not allowed to impersonate anonymous
- User root is not allowed to impersonate anonymous
- User root is not allowed to impersonate anonymous
- org.apache.hadoop.ipc.RemoteException: User: root is not allowed to impersonate root
- root is not allowed to impersonate root
- livy出错:User: livy is not allowed to impersonate cloudera
- hbase错误:Org.apache.hadoop.ipc.RemoteException:User:client is not allowed to impersonate root
- hadoop is not allowed to impersonate hadoop
- User: root is not allowed to impersonate admin
- Oozie-Error: E0501: User: oozie is not allowed to impersonate root [ Edited ]
- org.apache.hadoop.ipc.RemoteException: User: root is not allowed to impersonate root
- Mysql:is not allowed to connect to this MySQL server
- Mysql:is not allowed to connect to this MySQL server
- Host 'XXX' is not allowed to connect to this MySQL server 解决方案/如何开启MySQL的远程帐号
- ERROR 1130 (HY000): Host 'xxxxxx' is not allowed to connect to this MySQL server解决办法
- 远程mysql_java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- is not allowed to connect to this MySQL server