java.io.IOException:文件/tmp/hadoop-eo/mapred/system/jobtracker.info只能复制到0个节点,而不是2个节点

时间:2014-08-05 09:18:36

标签: java hadoop

当我在主机上部署hadoop namenode时,我们会一次又一次地获得异常,任何人都可以帮忙提出任何建议吗?提前谢谢。

2014-08-05 09:08:00,538 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Number of transactions: 31 Total time for transactions(ms): 1Number of transactions batched in Syncs: 0 Number of syncs: 21 SyncTimes(ms): 17
2014-08-05 09:08:00,542 INFO org.apache.hadoop.ipc.Server: IPC Server handler 189 on 22700, call addBlock(/tmp/hadoop-eo/mapred/system/jobtracker.info, DFSClient_1214769458, null) from 10.80.146.177:46093: error: java.io.IOException: File /tmp/hadoop-eo/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 2
java.io.IOException: File /tmp/hadoop-eo/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 2
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1531)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:685)
        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:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        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:1059)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)
2014-08-05 09:08:10,558 INFO org.apache.hadoop.ipc.Server: IPC Server handler 280 on 22700, call addBlock(/tmp/hadoop-eo/mapred/system/jobtracker.info, DFSClient_1214769458, null) from 10.80.146.177:46094: error: java.io.IOException: File /tmp/hadoop-eo/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 2
java.io.IOException: File /tmp/hadoop-eo/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 2
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1531)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:685)
        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:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        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:1059)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)

2 个答案:

答案 0 :(得分:0)

您是否开始使用hadoop服务?
因为你的jps显示只有jps正在运行。

$HADOOP_PATH/sbin/start-dfs.sh
$HADOOP_PATH/sbin/start-yarn.sh 
or
$HADOOP_PATH/sbin/start-all.sh

如果你已经启动了hadoop服务但面临同样的错误,你可以上传hadoop日志文件吗?

答案 1 :(得分:0)

datanode设置后,滚动异常消失了。 如果没有可用的datanode,我认为这是预期的例外,但不确定。