Hue File Browser not working

夙愿已清 提交于 2019-12-10 04:49:46

问题


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)

回答1:


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>



回答2:


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'?




回答3:


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.




回答4:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!