Hue / Hive用户root不能模拟Hue [英] Hue/Hive user root is not allowed to impersonate Hue
问题描述
情况:
我已经在不同的Docker容器中设置了Hive,Hue和Hadoop。在同一个Docker网络中。我为每个1个Hadoop Namenode,2个Datanode,1个Hue实例,1个Hive Server和一个Postgres Metastore创建了一个容器。我能够在namenode的hdfs-site.xml中配置一个色相代理用户,并且可以通过webhdfs浏览文件系统。但是对于Hive,我在Hue中遇到错误:
Situation: I have set up Hive, Hue and Hadoop in different Docker Containers. In the same Docker network. I created a Container for each 1 Hadoop Namenode, 2 Datanodes,1 Hue instance, 1 Hive Server and a Postgres Metastore. I was able to configure a hue proxy user in the hdfs-site.xml of the namenode and can browse the filesystem via webhdfs. For Hive however I get the error within Hue:
Failed to open new session: java.lang.RuntimeException:
org.apache.hadoop.ipc.RemoteException
(org.apache.hadoop.security.authorize.AuthorizationException):
User: root is not allowed to impersonate hue
例如,我能够在Hive中创建Hive表或从Sparkjobs内对其进行写入。
到目前为止我已经尝试过:
我已经尝试添加诸如
- hive.server2.proxy.user =色调
- hive.server2.enable.impersonation = true
- hadoop.proxyuser.hue.hosts = *
- hive.server2.authentication = None
- hive.server2.proxy.user = hue
- hive.server2.enable.impersonation=true
- hadoop.proxyuser.hue.hosts=*
- hive.server2.authentication=NONE
在不同的配置文件中,例如:
in different configuration files like:
- hdfs-namenode配置文件夹中的core-site.xml
- hive-hadoop文件夹中的core-site.xml
- hdfs-site.xml都位于
- hive- site.x hive-conf文件夹中的ml
- core-site.xml in hdfs-namenode configuration folder
- core-site.xml in hive-hadoop folder
- hdfs-site.xml in both
- hive-site.xml in hive-conf folder
大多数此类问题是在类似的问题中提出的,但似乎无法解决-日期了。对于某些属性,Hive说:属性未知
Most of this was suggested in similar questions but it does not seem up to-date anymore. For some properties Hive says: Property unknown
我需要澄清的内容:
- 将配置添加到的正确文件是什么?
- 要添加的正确属性是什么?
- 是否需要添加一些有关元存储的配置?
其他信息:
-Hive版本:2.3.1
-Hive Hadoop版本:2.7.4
-Hadoop群集版本:2.7.2(我认为版本差异不应该是这里的问题吗? !)
Additional Information: - Hive Version: 2.3.1 - Hive Hadoop Version: 2.7.4 - Hadoop Cluster Version: 2.7.2 (I think version difference should not be the problem here ?!)
色调版本:4(gethue / hue:最新形式的docker-hub)
Hue Version: 4 (gethue/hue:latest form docker-hub)
- The full error log here
- Hive configuration here
- HDFS-site configuration here
推荐答案
好的,我找到了一个可行的解决方案:
Okay I found a solution that works:
将以下属性添加到hadoop namenode和datanodes core-site.xml:
Add the following properties to the hadoop namenodes and datanodes core-site.xml:
<property>
<name>hadoop.proxyuser.root.groups</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.root.hosts</name>
<value>*</value>
</property>
此外,如果Hive在其他机器/容器中运行,则需要将路径设置为Hive config。 hue .ini文件并将hive-config文件夹复制到您的hue容器/机器中。
Furthermore you need to set the path to Hive config if Hive is running on another machine/container in the hue .ini file and copy the hive-config folder to your hue container/machine.
请注意,在Hue文档中,WebHdfs的配置是在 hdfs-site.xml ,并且配置单元在 hive-site.xml
Note that in the Hue docs the configuration for WebHdfs is done in the hdfs-site.xml and the hive configuration is done in hive-site.xml
这篇关于Hue / Hive用户root不能模拟Hue的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!