Bjoern Urban
Bjoern Urban

Reputation: 328

Hue/Hive user root is not allowed to impersonate 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

I am able to create Hive tables in Hive or write to them from within Sparkjobs for example.

What I've tried so far:

I've tried adding properties like

in different configuration files like:

Most of this was suggested in similar questions but it does not seem up to-date anymore. For some properties Hive says: Property unknown

What I need clarification on:

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 ?!)

Hue Version: 4 (gethue/hue:latest form docker-hub)

Upvotes: 1

Views: 5293

Answers (2)

momo
momo

Reputation: 1

I also encountered the same problem as you. The difference is that I built a Hadoop Ecological Cluster locally. When I wanted to integrate my HDFS file system with hue, I encountered this problem. My idea is that my Hadoop belongs to the root user. When I installed hue, I added hue users, so I need to change the permissions of my hue, Let my hue access Hadoop. In fact, this is just like the mutual access between folders. My Hadoop belongs to the highest level of root, but my hue is not, so the idea is very clear. I hope I can help you

Upvotes: 0

Bjoern Urban
Bjoern Urban

Reputation: 328

Okay I found a solution that works:

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>

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.

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

Upvotes: 1

Related Questions