could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running

不管现实多么惨不忍睹,都要持之以恒地相信,这只是黎明前短暂的黑暗而已。不要惶恐眼前的难关迈不过去,不要担心此刻的付出没有回报,别再花时间等待天降好运。真诚做人,努力做事!你想要的,岁月都会给你。could only be replicated to 0 nodes instead of minReplication (=1). There are 1 datanode(s) running,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

Hadoop Java API 开发操作时hdfs 时出现如下错误:

先翻译一把:

could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running

只能复制到0个节点,而不是minReplication(=1)。有一个datanode(s)运行

就是说:多个nodedata要做副本处理,结果当前只有一个节点,但是不能到这一个节点。因此失败:为什么失败呢 ???

就是尼玛的端口问题,不知道的朋友,把Linux的防火墙关了即可:

或者加上这一个行:centos7  的解决办法,50020、50010 端口开启即可:

# firewall-cmd –permanent –add-port=50020/tcp

# firewall-cmd –permanent –add-port=50010/tcp

然后再重启防火墙:systemctl restart firewalld.service 

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hdfsapi/test/liuxing1.txt 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.

at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617)


at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073)


at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2086)


at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2082)


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:1693)

at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2080)

could only be replicated to 0 nodes instead of minReplication (=1).  There are 1 datanode(s) running

端口开启就是:50010 

Hadoop 端口使用的详情:
https://blog.csdn.net/jeffiny/article/details/78728965

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/160953.html

(0)
飞熊的头像飞熊bm

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!