zoukankan      html  css  js  c++  java
  • hadoop多次格式化后,导致datanode启动不了

    hadoop多次格式化后,导致datanode启动不了,并且在datanode里面执行

     hadoop datanode -upgrade 会抛出如下异常:

    ************************************************************/
    2014-08-27 14:51:25,917 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: registered UNIX signal handlers for [TERM, HUP, INT]
    2014-08-27 14:51:26,126 WARN org.apache.hadoop.hdfs.server.common.Util: Path /usr/local/hadoop-2.4.0/dfs/data should be specified as a URI in configuration files. Please update hdfs configuration.
    2014-08-27 14:51:26,501 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
    java.net.UnknownHostException: VM_32_234_centos: VM_32_234_centos
            at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
            at org.apache.hadoop.security.SecurityUtil.getLocalHostName(SecurityUtil.java:186)
            at org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:206)
            at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1770)
            at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1812)
            at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1988)
            at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:2012)
    Caused by: java.net.UnknownHostException: VM_32_234_centos
            at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
            at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
            at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
            at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
            ... 6 more
    2014-08-27 14:51:26,504 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
    2014-08-27 14:51:26,505 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG: 
    /************************************************************
    SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: VM_32_234_centos: VM_32_234_centos
    ************************************************************/

    2.40版本解决 ,在master和namenode 上执行

    rm -Rf tmp/*
    rm -Rf dfs/data/*
    rm -Rf dfs/name/*
    

    然后再master上重新格式化

    hadoop namenode -format
  • 相关阅读:
    day12_字符连接单引号转意字符
    day12_存储过程说明
    day12_PLSQL编程--存储过程---统一发布动态属性管理
    linux关闭celinux服务
    day11__表管理
    day11_分区表------子分区的母模板(11g)
    day11_分区表------子分区的母模板(10g)
    day11_分区表——分区表常用维护
    smartforms 中的currquan单位处理
    当SVN服务器端IP地址发生变化时,客户端重新定位
  • 原文地址:https://www.cnblogs.com/mjorcen/p/3939569.html
Copyright © 2011-2022 走看看