错误:hdfs.DFSClient: Exception in createBlockOutputStream java.io.IOException:

hadoop 运行任务的时候突然报错:

java.io.IOException: Bad connect ack with firstBadLink 192.168.1.11:50010
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.createBlockOutputStream(DFSClient.java:2903)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2826)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2102)
at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2288)


某次运行一个任务时,报出了以下的错误提示:
10/12/10 21:09:05 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.io.IOException: Bad connect ack with firstBadLink 10.1.73.148:50010
10/12/10 21:09:05 INFO hdfs.DFSClient: Abandoning block blk_3623545154924652323_87440
10/12/10 21:09:11 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.net.ConnectException: Connection refused
10/12/10 21:09:11 INFO hdfs.DFSClient: Abandoning block blk_-4726571439643867938_87441\
原因
错误提示中包含了任务跟踪/数据节点机器的IP地址(10.1.73.148)。出现错误的原因是这台机器上的数据节点的守护进程没有在运行;通过登录这个机器确认错误,例子中的机器是10.1.73.148。所以运行一下命令:jps,看有没有datenode在运行,如果没有任何返回,那么一位着数据节点的守护进程没有运行。

还有一种可能:原因是运行的任务要求包含了某数据块。如果这个数据块在其他机器上有复本,并且其他机器正运行着数据节点的守护进程,那么Hadoop将会从其他机器上获取数据块,然后继续执行任务,但如果其他任何机器上没有该数据块可用,那么任务就会失败。

解决方法
登录到10.1.73.148,运行如下命令:
hadoop-daemon.sh start datanode
以上命令会启动10.1.73.148上数据节点的守护进程。重新运行一下任务,应该不会再报错了。

hdfs.DFSClient: DataStreamer Exception

06-08

WARN hdfs.DFSClient: DataStreamer Exceptionrnorg.apache.hadoop.ipc.RemoteException(java.io.IOException): File /profile._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.rn at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1384)rn at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2477)rn at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:555)rn at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:387)rn at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:59582)rn at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)rn at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)rn at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2048)rn at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAs(Subject.java:415)rn at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)rn at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2042)rnrn at org.apache.hadoop.ipc.Client.call(Client.java:1347)rn at org.apache.hadoop.ipc.Client.call(Client.java:1300)rn at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)rn at com.sun.proxy.$Proxy9.addBlock(Unknown Source)rn at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:330)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)rn at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)rn at com.sun.proxy.$Proxy10.addBlock(Unknown Source)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1226)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1078)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:514)rnput: File /profile._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.rn14/06/08 21:37:44 ERROR hdfs.DFSClient: Failed to close file /profile._COPYING_rnorg.apache.hadoop.ipc.RemoteException(java.io.IOException): File /profile._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.rn at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1384)rn at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2477)rn at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:555)rn at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:387)rn at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java:59582)rn at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)rn at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)rn at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2048)rn at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)rn at java.security.AccessController.doPrivileged(Native Method)rn at javax.security.auth.Subject.doAs(Subject.java:415)rn at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)rn at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2042)rnrn at org.apache.hadoop.ipc.Client.call(Client.java:1347)rn at org.apache.hadoop.ipc.Client.call(Client.java:1300)rn at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)rn at com.sun.proxy.$Proxy9.addBlock(Unknown Source)rn at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:330)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:606)rn at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:186)rn at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)rn at com.sun.proxy.$Proxy10.addBlock(Unknown Source)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1226)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1078)rn at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:514)rn集群环境下,上传文件报的异常

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试

关闭