码迷,mamicode.com
首页 > 其他好文 > 详细

hadoop多次格式化后,导致datanode启动不了

时间:2014-08-27 16:20:27      阅读:365      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   os   java   io   for   ar   2014   

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

 

hadoop多次格式化后,导致datanode启动不了

标签:style   blog   color   os   java   io   for   ar   2014   

原文地址:http://www.cnblogs.com/mjorcen/p/3939569.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!