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

问题

上传文件到Hadoop异常,报错信息如下:

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /home/input/qn_log.txt._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.

解决

1、查看问题节点的进程情况:

DataNode进程没有启动

2、查看Hadoop datanode.log信息

2018-08-17 05:48:58,076 WARN org.apache.hadoop.hdfs.server.common.Storage: Failed to add storage directory [DISK]file:/usr/local/hadoop2.7/dfs/data/
java.io.IOException: Incompatible clusterIDs in /usr/local/hadoop2.7/dfs/data: namenode clusterID = CID-e1a65f22-f0f6-4423-8c2b-03edd2f30766; datanode clusterID = CID-647259e5-0250-4676-8327-a09f8ccd38a7

报错的信息为,namenode clusterID 与 datanode clusterID 不一致!

分别为:

namenode clusterID = CID-e1a65f22-f0f6-4423-8c2b-03edd2f30766
datanode clusterID = CID-647259e5-0250-4676-8327-a09f8ccd38a7

回想了下,出现这个问题的原因:在于我在重启Docker容器之后,对HDFS重新做了格式化,导致版本不一致

3、解决:

方法:将DataNode的版本,修改到与NameNode一致

(1)修改dfs/data/current/VERSION文件中,将clusterID的值,改为与namenode的clusterID的值
(2)重启集群,注意, 勿执行namenode格式化,如下:

$HADOOP_HOME/sbin/start-dfs.sh
$HADOOP_HOME/sbin/start-yarn.sh

再查一下节点进程

DataNode进程启动起来了!

再试一下上传,也OK了

原文地址:https://www.cnblogs.com/Fordestiny/p/9493433.html

时间: 2024-08-11 13:14:11

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

SSH上传文件时报错

SSH上传文件时报错:encountered 1 errors during the transfer. 百度了一下,了解到客户端(Windows)这边的待上传文件不能放在有小括号的文件夹中,于是我将小括号去掉,果然就可以了. 版权声明:本文为博主原创文章,未经博主允许不得转载.

关于python3.6上传文件时报错:HTTPSConnectionPool(host='httpbin.org', port=443): Max retries exceeded with url: /post (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAIL解决办法

第一个报错: 最近在练习post请求中上传文件时遇到了一个奇葩事情,两台电脑上写了一模一样的代码,一个运行正常,另一个一片红. 最后了解了一下原因以及解决办法.先记录下关键代码: files = {"files":(r"F:\test.txt","xixihaha")} #直接将目标文件内容xixihaha通过文件test.txt进行上传 r = requests.post(url,files=files)print(r.headers) #前边

hadoop用put上传文件时报错

用命令-put上传文件 报错0 datanode(s) running 原因是进行了多次格式化 解决办法: 停止集群 删除在hdfs中配置的data目录(即在core-site.xml中配置的hadoop.tmp.dir对应文件件)下面的所有数据; 重新格式化namenode(切换到hadoop目录下的bin目录下) 重新启动hadoop集群(切换到hadoop目录下的sbin目录下) 原文地址:https://www.cnblogs.com/wl2017/p/9932287.html

【大数据系列】hadoop上传文件报错_COPYING_ could only be replicated to 0 nodes

使用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 m

Hadoop上传文件的报错

baidu了很多,都说防火墙,datanode没有正常启动的问题,可是检查了都是正常,后来还是在老外的网站上找到了解决的方法 修改了/etc/security/limits.conf文件,上传成功 这些hadoop的报错都是莫名其妙,从这个日志无法看出是这个的问题,看来还是要自己慢慢积累 * soft nofile 65536 * hard nofile 65536 hadoop dfs -put 1.txt /input/ 报错日志如下: 15/06/24 14:45:40 WARN util

Flex和Servlet结合上传文件报错(一)

1.具体错误如下 一个表单域 不是一个表单域 java.io.FileNotFoundException: D:\MyEclipse\workspace\FlexFileUpload\Web\null\鏂板缓 Microsoft Word 鏂囨..docx (系统找不到指定的路径.) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:1

Flex和Servlet结合上传文件报错(二)

1.具体报错如下 一个表单域 不是一个表单域 java.io.FileNotFoundException: D:\MyEclipse\workspace\FlexFileUpload\Web\uploadFolder\鏌卞舰鍥?xls (文件名.目录名或卷标语法不正确.) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at

jS Ajax 上传文件报错&quot;Uncaught TypeError: Illegal invocation&quot;

jS Ajax 上传文件报错"Uncaught TypeError: Illegal invocation" query-3.1.1.min.js:4 Uncaught TypeError: Illegal invocation 错误原因: jQuery Ajax 上传文件处理方式, 使用ajax向后台发送数据时其中的图片数据的参数类型为file,属于对象,而不是一个字符串值.导致错误的出现 var formData = new FormData(); formData.append(

hadoopmaster主机上传文件出错: put: File /a.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1). There are 3 datanode(s) running and 3 node(s) are excluded in this operation.

刚开始装好hadoop的时候,namenode机上传文件没有错误,今天打开时突然不能上传文件,报错 put: File /a.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1). There are 3 datanode(s) running and 3 node(s) are excluded in this operation. 上网查了一下,先把,nnamenode和datanod