hive 之 beeline连接hive报错: hadoop is not allowed to impersonate hive(state=08S01,code=0)

场景

使用beeline连接hive时报错。

[hadoop@bigdata02 ~]$ beeline -u "jdbc:hive2://bigdata01:10000/lzh"  -n hadoop -p 123

错误信息

Error: Could not open client transport with JDBC Uri: jdbc:hive2://bigdata01:10000/lzh: 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 hive(state=08S01,code=0)

 

 解决方法

在hadoop配置文件core-site.xml中添加如下内容

<property>
    <name>hadoop.proxyuser.当前用户名.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.当前用户名.groups</name> 
<value>*</value>
</property>

 

posted on 2022-06-01 11:52  Simple-Sir  阅读(709)  评论(0编辑  收藏  举报

导航