remarkzhao 发表于 2016-10-2 13:29:26

copyFromLocal 失败 求助各位大神。。

小弟刚在amazonaws ec2 上搭了三台机子 。
ubuntu@machine0:~$ hdfs dfs -copyFromLocal firsthadoop.txt /in

16/10/02 04:15:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

16/10/02 04:15:06 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /in/firsthadoop.txt._COPYING_ could only be replicated to 0 nodes instead of minReplica                tion (=1).There are 0 datanode(s) running and no node(s) are excluded in this operation.
      at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1549)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3200)
      at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:641)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:482                )
      at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.j                ava)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:619)
      at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:962)
      at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2039)
      at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2035)
      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:1628)
      at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2033)

      at org.apache.hadoop.ipc.Client.call(Client.java:1468)
      at org.apache.hadoop.ipc.Client.call(Client.java:1399)
      at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:232)
      at com.sun.proxy.$Proxy9.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:399)
      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:187)
      at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
      at com.sun.proxy.$Proxy10.addBlock(Unknown Source)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1532)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1349)
      at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:588)
copyFromLocal: File /in/firsthadoop.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).There are 0 datanode(s) running a                nd no node(s) are excluded in this operation

machine0 jps命令下现在是这样
ubuntu@machine0:~$ jps
13564 NameNode
14618 Jps
13785 SecondaryNameNode
13927 ResourceManager


请问这是什么原因?先谢过啦!


einhep 发表于 2016-10-2 14:19:11

datanode挂掉了

arsenduan 发表于 2016-10-2 17:06:24

datanode进程不在,并且异常显示datanode的问题,所以不能往上copy数据

可以查看下日志,看看什么原因。
恢复了就能复制了
页: [1]
查看完整版本: copyFromLocal 失败 求助各位大神。。