Yarn JobHistory错误:container_1400260444475_3309_01_000001的重定向失败

时间:2014-06-06 07:09:05

标签: hadoop mapreduce yarn

我的MR工作成功执行。但是当我检查其历史记录时收到错误:

Failed redirect for container_1400260444475_3309_01_000001

Failed while trying to construct the redirect url to the log server. Log Server url may not be     configured Unknown container. Container either has not started or has already completed or doesn't belong to this node at all.

我的HistoryServer运行正常。 好的是,旧的工作(退休的)我可以从JobHistory UI浏览。 只有它缺少最近的工作。

我是否需要更改日志滚动属性,保留期?

提前致谢!!!

3 个答案:

答案 0 :(得分:6)

尝试以下步骤

  1. 添加到mapred-site.xml
  2.  try {
            UserAdmin dataUser = userService.get(sessionUser);
            String userAuth = dataUser.getAuthority();
            System.out.println(userAuth);
            if(userAuth.equals("ROLE_ANGGOTA") || userAuth.equals("ROLE_PENGURUS")){
                return "redirect:/user/index.html";
            }
            else if(userAuth.equals("ROLE_ADMIN")){
                return "redirect:/admin/index.html";
            }
        } catch(IllegalArgumentException ex){
           //handle it properly here
         }catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    
    1. 添加到yarn-site.xml
    2. <name>mapreduce.jobhistory.address </name>
      <value>hostName:10020</value>
      
      <name>mapreduce.jobhistory.webapp.address</name>
      <value>hostName:19888</value>
      
      1. 启动历史记录服务器 $ mr-jobhistory-daemon.sh start historyserver

答案 1 :(得分:2)

我通过在mapred-site.xml

中添加实际主机名而不是0.0.0.0来解决此问题
<name>mapreduce.jobhistory.address </name>
<value>hostName:10020</value>

<name>mapreduce.jobhistory.webapp.address</name>
<value>hostName:19888</value>

答案 2 :(得分:0)

仔细检查map-reduce历史记录服务器是否正在运行!

service hadoop-mapreduce-historyserver status

可访问:

curl localhost:19888 -I