Hue文件浏览器无法正常工作

时间:2013-09-04 13:17:12

标签: hadoop hue

我已经安装了hue并且hue中的文件浏览器无法运行并且正在抛出“服务器错误(500)”

来自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

注意:我已将以下内容添加到core-site.xml,并启用了webhdfs

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

我尝试通过色调中的oozie

访问hdfs文件位置时出错
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)

4 个答案:

答案 0 :(得分:11)

芯-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>

答案 1 :(得分:2)

您需要将hduser指定为代理用户:

 <property>
      <name>hadoop.proxyuser.hduser.hosts</name>
      <value>*</value>
 </property>
 <property>
      <name>hadoop.proxyuser.hduser.groups</name>
      <value>*</value>
 </property>
顺便说一句:你为​​什么不把Hue作为'hue'来运行?

答案 2 :(得分:1)

您以什么用户身份登录?

我有同样的问题,我的解决方案是创建一个名为&#34; hdfs&#34;的HUE用户。并添加了&#34; hue&#34; Linux用户在&#34; hadoop&#34;和&#34; hdfs&#34; linux用户组。

所以现在我登录为&#34; hdfs&#34;用户在HUE Web UI中。

答案 3 :(得分:0)

您可能会看到Failed to obtain user group information

根据Hadoop docs,通过调用shell命令(在* nix系统上)groups $USERNAME来收集组信息。因此,匹配用户必须存在作为 HDFS Namenode 中的Linux用户,进行身份验证过程。

所以解决方案很简单,

useradd hue -g root Namenode

我正在docker容器中部署hdfs,所以我使用了组root。该值与运行Namenode进程的用户(绝对是超级用户)相同。

相关问题