首页 > 代码库 > hadoop多次格式化后,导致datanode启动不了
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 secureMainjava.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 more2014-08-27 14:51:26,504 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 12014-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
hadoop多次格式化后,导致datanode启动不了
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。