Hue File Browser not working

i have installed hue and the file browser in hue is not working and is throwing a "Server Error (500)"

data from error.log

webhdfs      ERROR    Failed to determine superuser of WebHdfs at http://namenode:50070/webhdfs/v1: SecurityException: Failed to obtain user group information: org.apache.hadoop.security.authorize.AuthorizationException: User: hue is not allowed to impersonate hue (error 401)
Traceback (most recent call last):
  File "/home/hduser/huef/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 108, in superuser
    sb = self.stats('/')
  File "/home/hduser/huef/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 188, in stats
    res = self._stats(path)
  File "/home/hduser/huef/hue/desktop/libs/hadoop/src/hadoop/fs/webhdfs.py", line 182, in _stats
    raise ex

Note : i have added the following to core-site.xml and i have enabled webhdfs

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

Error when i try to access hdfs file location through oozie in hue

An error occurred: SecurityException: Failed to obtain user group information: org.apache.hadoop.security.authorize.AuthorizationException: User: hue is not allowed to impersonate hduser (error 401)

Answers


core-site.xml

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

hdfs-site.xml

<property>
     <name>dfs.webhdfs.enabled</name>
     <value>true</value>
</property>

You need to specify hduser as the proxy user:

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

BTW: why are you not running Hue as 'hue'?


What user are you logged as?

I had same issue, my solution was to create a HUE user called "hdfs" and added "hue" Linux user in "hadoop" and "hdfs" linux users groups.

So now I am logged in as "hdfs" user in HUE web UI.


You may see it says Failed to obtain user group information.

According to Hadoop docs, the group info is gathered by invoking shell command (on *nix system) groups $USERNAME. Therefore, the matching user MUST EXIST as a Linux user in HDFS Namenode, where authentication process occurs.

So the solution is simple as,

useradd hue -g root On the Namenode.

I'm deploying hdfs in a docker container, so I use group root. The value is the same as the user running the Namenode process (who is definitely the superuser).


Need Your Help

RegEx in SQL Server 2008

regex sql-server-2008 substring

I am not very familiar with RegEx and I have a scenario whereby I think the best option is to use RegEx. Actually, I have a column which hold values starting with a character, followed by numeric, ...

Laravel5 deployment share env variables between both CLI and web server

php nginx environment-variables fpm

I am deploying a Laravel app and a part of my build script is to run ./artisan migrate. While I can pass environment variables to web server by adding them to nginx site config in sites-available, ...