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)
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).
来源:https://stackoverflow.com/questions/18614940/hue-file-browser-not-working