我在vmware上安装了hadoop-2.2.0版本,当它启动时,它会显示所有进程都在工作,但是过了一段时间datanode就会被杀死。所以,我查了一下日志发现:
2014-01-21 04:36:00,325 WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2014-01-21 04:36:21,034 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Exception in secureMain
java.net.UnknownHostException: ubuntu: ubuntu
at java.net.InetAddress.getLocalHost(InetAddress.java:1402)
at org.apache.hadoop.security.SecurityUtil.getLocalHostName(SecurityUtil.java:227)
at org.apache.hadoop.security.SecurityUtil.login(SecurityUtil.java:247)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1640)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1665)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1837)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1858)
2014-01-21 04:36:21,107 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 1
2014-01-21 04:36:21,114 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at java.net.UnknownHostException: ubuntu: ubuntu
************************************************************/
1条答案
按热度按时间9jyewag01#
我想问题出在你自己身上
/etc/hosts
文件。确保配置正确。我的/etc/hosts
文件如下所示:为主人和
为奴隶1。