Hadoop的一些报错

一、hdfs dfs -put a.txt /  上传文件到hdfs,发现上传不了,报了一个错误:put: File /a.txt._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 2 datanode(s) running and 2 node(s) are excluded in this operation.

上面提示说复制不过去,有两个datanode在运行,但是就是复制不过去,jps查看datanode确实运行正常,但是为什么复制不过去呢?

经过多次尝试发现原来是datanode的防火墙没关,systemctl stop firewalld 关闭防火墙后在上传发现成功了,bingo!

原文地址:https://www.cnblogs.com/xiaozhican/p/9800497.html