hadoop在启动时遇到错误。以下是jobtracker的日志信息:
2015-06-03 09:38:26,106 WARN org.apache.hadoop.hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /tmp/hadoop-hadooptest/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2091)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:795)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:587)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1432)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1428)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1426)
at org.apache.hadoop.ipc.Client.call(Client.java:1113)
at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
at com.sun.proxy.$Proxy7.addBlock(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
at com.sun.proxy.$Proxy7.addBlock(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSClient.java:3779)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:3639)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2600(DFSClient.java:2842)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:3082)
继续上述步骤:
2015-06-03 09:38:26,107 WARN org.apache.hadoop.hdfs.DFSClient: Error Recovery for null bad datanode[0] nodes == null
2015-06-03 09:38:26,107 WARN org.apache.hadoop.hdfs.DFSClient: Could not get block locations. Source file "/tmp/hadoop-hadooptest/mapred/system/jobtracker.info" - Aborting...
2015-06-03 09:38:26,107 WARN org.apache.hadoop.mapred.JobTracker: Writing to file hdfs://172.18.11.9:9000/tmp/hadoop-hadooptest/mapred/system/jobtracker.info failed!
2015-06-03 09:38:26,107 WARN org.apache.hadoop.mapred.JobTracker: FileSystem is not ready yet!
2015-06-03 09:38:26,130 WARN org.apache.hadoop.mapred.JobTracker: Failed to initialize recovery manager.
磁盘空间足够了,我已经关闭了防火墙,结果是:
[hadooptest@hw009 logs]$ chkconfig iptables --list
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
这就是为什么?如何解决这个问题?非常感谢。
我尝试过一些方法,但无法解决问题。
输入link1
输入link2
输入链接3
1条答案
按热度按时间k3fezbri1#
我已经解决了这个问题。我用了普通的
bin/start-all.sh
启动hadoop cluster.but now我运行commondbin/start-dfs.sh
首先,然后运行commondbin/start-mapred.sh
5分钟后。我想可能我的服务器太旧了,所以启动hdfs需要很长时间,当hdfs真正运行时,启动mapred系统不会遇到问题。