错误:
could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running and 1 node(s) are excluded in this operation.
DEBUG发现,客户端返回的datanode地址位 127.0.0.1.导致文件传输不了
修复:
1. 修改 /etc/hosts 文件,把 localhost/hostname 指向本机ip 192.168.2.2(本机IP)。重启HDFS.
本文详细解析了HDFS中出现的replication错误,即文件只能复制到0个节点而非预期的1个节点的问题。通过DEBUG发现,客户端返回的datanode地址为127.0.0.1,导致文件无法正常传输。文章提供了有效的解决方案,即修改/etc/hosts文件,将localhost/hostname指向本机实际IP,并重启HDFS,从而成功解决replication错误。
784

被折叠的 条评论
为什么被折叠?



