Hive连接报错,显示用户没有权限 org.apache.hadoop.ipc.RemoteException:User: xxx is not allowed to impersonate root

Hive连接报错,显示用户没有权限 org.apache.hadoop.ipc.RemoteException:User: xxx is not allowed to impersonate root

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

xxx 是用户名,大概是Hive会对用户进行校验,而xxx并没被识别出来,造成连接出错,可以通过以下两种方法尝试解决

1.关闭主机校验

修改hive安装目录下conf/hive-site.xml,将hive.server2.enable.doAs设置成false

<property>
    <name>hive.server2.enable.doAs</name>
    <value>false</value>
    <description>
      Setting this property to true will have HiveServer2 execute
      Hive operations as the user making the calls to it.
    </description>
  </property>

2.设置主机代理

为hadoop安装目录下的core-site.xml添加如下配置

    <property>
	<name>hadoop.proxyuser.root.hosts</name>
	<value>*</value>
    </property>
    <property>
	<name>hadoop.proxyuser.root.groups</name>
	<value>*</value>
  </property>

该设置下“root”为连接hive账号

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值