【问题标题】:Hue File Browser not working色相文件浏览器不工作
【发布时间】:2013-09-04 13:17:12
【问题描述】:

我已经安装了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 in hue 访问 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)

【问题讨论】:

    标签: hadoop hue


    【解决方案1】:

    核心站点.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>
    

    【讨论】:

    • 哪个路径?在主节点上?
    • Hadoop 配置文件存储在每个 hadoop 节点的 /etc/hadoop/conf 目录中。您可以使用集群管理器软件(例如 Ambari)来管理配置并只编辑一次。
    【解决方案2】:

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

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

    顺便说一句:你为​​什么不将 Hue 作为“hue”运行?

    【讨论】:

    • 如您所说尝试更改 core-site.xml ,它仍然给我同样的错误。尝试将 Hue 作为“hue”而不是作为 hduser 运行。仍然得到同样的错误。已使用新错误日志编辑问题。
    • 你重启NameNode了吗?
    • 是的,我做了 stop-dfs.sh、stop-mapred.sh,然后是 start-dfs.sh、start-mapred.sh。这样就够了吧?
    • 我没有为“hue”创建单独的用户。使用现有用户“hduser”安装它。这就是为什么我以'hduser'的身份运行hue。还有一件事,当我重新启动集群时,secondarynamenode 并没有停止。这可能是一个原因吗?
    • 如果您使用 Ambari 管理堆栈,则需要通过 GUI 添加这些属性,否则通过 GUI 重新启动服务时将覆盖手动编辑的文件。
    【解决方案3】:

    你是以什么用户身份登录的?

    我有同样的问题,我的解决方案是创建一个名为“hdfs”的 HUE 用户,并在“hadoop”和“hdfs”Linux 用户组中添加“hue”Linux 用户。

    所以现在我在 HUE Web UI 中以“hdfs”用户身份登录。

    【讨论】:

      【解决方案4】:

      你可能会看到它写着Failed to obtain user group information

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

      所以解决方法很简单,

      useradd hue -g root Namenode 上。

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-03-11
        • 1970-01-01
        • 2018-11-02
        • 2016-05-12
        • 2014-03-09
        相关资源
        最近更新 更多