zoukankan      html  css  js  c++  java
  • Could not determine own NN ID in namespace 'mycluster'.

    执行hdfs namenode -bootstrapStandby的时候报错如下

    java.io.IOException: java.lang.IllegalStateException: Could not determine own NN ID in namespace 'mycluster'. Please ensure that this node is one of the machines listed as an NN RPC address, or configure dfs.ha.namenode.id
            at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:428)
            at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1482)
            at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1582)
    Caused by: java.lang.IllegalStateException: Could not determine own NN ID in namespace 'mycluster'. Please ensure that this node is one of the machines listed as an NN RPC address, or configure dfs.ha.namenode.id
            at com.google.common.base.Preconditions.checkState(Preconditions.java:172)
            at org.apache.hadoop.hdfs.HAUtil.getNameNodeIdOfOtherNode(HAUtil.java:164)
            at org.apache.hadoop.hdfs.HAUtil.getConfForOtherNode(HAUtil.java:187)
            at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.parseConfAndFindOtherNN(BootstrapStandby.java:391)
            at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:104)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
            at org.apache.hadoop.hdfs.server.namenode.ha.BootstrapStandby.run(BootstrapStandby.java:423)
            ... 2 more
    

    错误信息里面说找不到NN id,这里我的nn是克隆出来的,所以查看hosts文件,是因为没有添加该节点的IP映射

    [xiaoqiu@s150 /etc]$ xcall.sh "cat /etc/hosts"
    ====s150 =====
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.109.150 s150
    192.168.109.151 s151
    192.168.109.152 s152
    192.168.109.153 s153
    
    ====s151 =====
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.109.150 s150
    192.168.109.151 s151
    192.168.109.152 s152
    192.168.109.153 s153
    
    ====s152 =====
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.109.150 s150
    192.168.109.151 s151
    192.168.109.152 s152
    192.168.109.153 s153
    
    ====s153 =====
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.109.150 s150
    192.168.109.151 s151
    192.168.109.152 s152
    192.168.109.153 s153
    

    应该使得每台主机的hosts文件都具有其他节点的IP映射



    欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
  • 相关阅读:
    zabbix真的很简单 (安装篇)
    flask 快速入门01 之 `Hello World!`
    结对编程作业
    XNA学习笔记(一)
    Ambari API 验证方式
    浅析Kerberos原理,及其应用和管理
    nginx进程属主问题讨论
    编码规范
    用samba访问windows目录[浙大嵌入式系统]
    在树莓派上格式化U盘[浙大嵌入式系统]
  • 原文地址:https://www.cnblogs.com/flyingcr/p/10326909.html
Copyright © 2011-2022 走看看