今天把hadoop环境给搭起来了,在master上面启动hadoop后,jps查看进程,SecondaryNameNode NameNode Jps DataNode JobTracker TaskTracker都没问题。但是去http://master:50070/dfshealth.jsp查看,live nodes为0。所以我到slave1和slave2上面去执行jps查看进程,结果都没有datanode进程,也就是说datanode没有启动成功,所以我就到logs里面去执行less hadoop-hadoop-datanode-slave2.log,发现报错的内容如下:
2013-06-11 02:22:13,637 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG: /************************************************************ STARTUP_MSG: Starting DataNode STARTUP_MSG: host = slave2/192.168.137.112 STARTUP_MSG: args = [] STARTUP_MSG: version = 0.20.2 STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'chrisdo' on Fri Feb 19 08:07:34 UTC 2010 ************************************************************/ 2013-06-11 02:22:14,931 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: master/192.168.137.110