使用hadoop上传文件 hdfs dfs -put  XXX

17/12/08 17:00:39 WARN hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/sanglp/hadoop-2.7.4.tar.gz._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.
at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget4NewBlock(BlockManager.java:1628)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getNewBlockTargets(FSNamesystem.java:3121)
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:3045)
at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:725)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB .java:493)
at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtoco lProtos.java)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:616)
at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:982)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2217)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2213)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1746)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2213) at org.apache.hadoop.ipc.Client.call(Client.java:1476)
at org.apache.hadoop.ipc.Client.call(Client.java:1413)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:229)
at com.sun.proxy.$Proxy10.addBlock(Unknown Source)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:418)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:191)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
at com.sun.proxy.$Proxy11.addBlock(Unknown Source)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1588)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1373)
at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:554)
put: File /user/sanglp/hadoop-2.7.4.tar.gz._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.

  查看hadoop是否正常,进程是否完整

查看磁盘使用情况

从这里可以看出操盘的空间都是空的

原因可能是hadoop格式化的时候出现了问题

然后将logs和tmp中的文件全部删除,重新格式化也没成功,后来看到clusterId不一致的问题

修改了VERSION文件中的clusterId随着又出现了  is in an inconsistent state的问题,

在hadoop-hdfs.xml中增加了

<property>
<name>dfs.name.dir</name>
<value>/soft/hadoop/name</value> #hadoop的name目录路径
</property>
<property>
<name>dfs.data.dir</name>
<value>/soft/hadoop/data</value> #hadoop的data目录路径
</property>

  重新格式化然后启动就可以了。

陆陆续续折腾了一上午、、、

【大数据系列】hadoop上传文件报错_COPYING_ could only be replicated to 0 nodes的更多相关文章

  1. Hadoop上传文件时报错: could only be replicated to 0 nodes instead of minReplication (=1)....

    问题 上传文件到Hadoop异常,报错信息如下: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /home/inpu ...

  2. hadoop上传文件报错

    19/06/06 16:09:26 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.io.IOException: Bad ...

  3. Linux - xshell上传文件报错乱码

    xshell上传文件报错乱码,解决方法 rz -be 回车 下载sz  filename

  4. Azkban上传文件报错installation Failed.Error chunking

    azkaban 上传文件报错Caused by: java.sql.SQLException: The size of BLOB/TEXT data inserted in one transacti ...

  5. Tomcat上传文件报错:returned a response status of 403 Forbidden

    出现这样的错误是没有权限对服务器进行写操作.需要在这个项目所在的tomcat中配置可写操作即可: 在tomcat的web.xml添加下面代码: <init-param><param- ...

  6. rz上传文件报错:rpm Read Signature failed: sigh blob(1268): BAD, read returned 0

    上传文件报错: [root@www localdisk]# rpm -ivh cobbler* error: cobbler-2.8.4-4.el7.x86_64.rpm: rpm  Read  Si ...

  7. SecureCRT sftp上传文件报错:put: failed to upload xxx 拒绝访问

    1.问题 使用sftp上传文件时报错:put: failed to upload xxx 拒绝访问.类似下图所示: 2.原因 造成这个问题的原因可能有两个,一是要上到的那个目录剩余磁盘空间不足,二是打 ...

  8. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  9. fetch上传文件报错的问题(multipart: NextPart: EOF)

    技术栈 后台: gin(golang) 前端: react+antd+dva 问题 前端这边使用fetch发送http请求的时候,后端解析formData报错: multipart: NextPart ...

随机推荐

  1. PHP 开发者该知道的 5 个 Composer 小技巧

    From: https://segmentfault.com/a/1190000000355928 Composer是新一代的PHP依赖管理工具.其介绍和基本用法可以看这篇<Composer P ...

  2. mysql错误代码对照表较完整 mysql_errno()

    From: http://blog.csdn.net/aidenliu/article/details/5925604 mysql错误代码对照表较完整  0101 属于其他进程的专用标志. 0102 ...

  3. php + crontab 执行定时任务

    1.yii2中的console <?php /** * @link http://www.yiiframework.com/ * @copyright Copyright (c) 2008 Yi ...

  4. glsl Dream

    <-vertex-> #version varying vec2 uv; void main(void) { uv = gl_MultiTexCoord0.st; gl_Position ...

  5. iOS:PSTCollectionView

    https://github.com/steipete/PSTCollectionView Open Source, 100% API compatible replacement of UIColl ...

  6. kafka学习之-server.properties详细说明

    http://blog.csdn.net/lizhitao/article/details/25667831  -- 参考文章 http://kafka.apache.org/documentatio ...

  7. [转]Python多线程与多线程中join()的用法

    https://www.cnblogs.com/cnkai/p/7504980.html Python多线程与多进程中join()方法的效果是相同的. 下面仅以多线程为例: 首先需要明确几个概念: 知 ...

  8. VisualSVN错误 Cannot query proxy blanket解决办法

    最近重新做了一下系统,在安装和使用svn过程中遇到了一些问题,记下备忘. 第一次安装好系统之后,安装VisualSVN遇到报错: Custom action InstallWMISchemaExcut ...

  9. Java正则表达式的使用和详解(上)

    1.匹配验证-验证Email是否正确 public static void main(String[] args) { // 要验证的字符串 String str = "service@xs ...

  10. JSP输出当前日期

    如何在网页中动态交互,输出当前日期? <%@ page language="java" import="java.util.*" contentType= ...