找不到DataNode进程原因总结
1.错误类型1<P> 如标题:错误如下:ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.net.BindException: Problem binding to /0.0.0.0:50010 : Address already in use
at org.apache.hadoop.ipc.Server.bind(Server.java:267)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:433)
at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:321)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1712)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1651)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1669)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1795)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1812)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:344)
at sun.nio.ch.Net.bind(Net.java:336)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.apache.hadoop.ipc.Server.bind(Server.java:265)
... 7 more</P>解决方案:
50010端口被占用,修改下datanode的默认端口就可以了
2.错误类型2
新增了dataNode节点,不知道怎么弄得,在测试helloword的时候,用bin/hadoop fs -put ../input ./in 始终报错,意思是dataNode找不到,等等,我就奇怪了。用/usr/jdk1.7.0_25/bin/jps查看了,果然,dataNode的进程少了,只有
查看了,当前节点下hadoop/logs/下的日志hadoop-hadoop-datanode-xxxxx.log,发现有异常,
2013-08-11 17:25:49,288 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2013-08-11 17:25:49,307 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
2013-08-11 17:25:49,309 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2013-08-11 17:25:49,309 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2013-08-11 17:25:49,476 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
2013-08-11 17:25:57,454 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in /home/hadoop/hadoop-1.1.2/tmp/dfs/data: namenode namespaceID = 1419700209; datanode namespaceID = 811245664
at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:232)
at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:147)
at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:399)
at org.apache.hadoop.hdfs.server.datanode.DataNode.<init>(DataNode.java:309)
at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1651)
at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1590)
at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1608)
at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1734)
at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1751)
2013-08-11 17:25:57,458 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
应变是namespaceID 不一致,后来网上找了下,最后确认是tmp目录里的文件导致的,在进行 bin/hadoopnamenode -format之后,会新生成namespaceID 和tmp目录下的产生冲突;
解决方案:
删除tmp下的文件 rm -rf * ,然后重新format namespace节点
,然后stop-all.sh ,重新启动start-all.sh,再次检查
$ /usr/jdk1.7.0_25/bin/jps
4315 Jps
4229 TaskTracker
4140 DataNode
已经启动了
解决方案2:可以直接修改VERSION里的namespaceID,使两者一致就可以了。
页:
[1]