部署单机hadoop遇到的一个小问题
今天云服务器上部署单机hadoop的时候,使用Big Data Tools连接HDFS上传文件时出现only be written to 0 of the 1 minreplication nodes. there are 1 datanode(s) running and 1 node(s) are excluded in this operation 这个问题。 需要在windows的hosts文件中添加
124.221.192.10 node1
外网ip workers中记录的dataNode名字
具体原因是在stackoverflow上找到的
https://stackoverflow.com/questions/5293446/hdfs-error-could-only-be-replicated-to-0-nodes-instead-of-1
It take me a week to figure out the problem in my situation.
When the client(your program) ask the nameNode for data operation, the nameNode picks up a dataNode and navigate the client to it, by giving the dataNode's ip to the client.
But, when the dataNode host is configured to has multiple ip, and the nameNode gives you the one your client CAN'T ACCESS TO, the client would add the dataNode to exclude list and ask the nameNode for a new one, and finally all dataNode are excluded, you get this error.
So check node's ip settings before you try everything!!!
以下是百度翻译:
我花了一个星期的时间才弄清楚我的处境中的问题。 当客户端(您的程序)向nameNode请求数据操作时,nameNode会拾取一个dataNode,并通过将dataNode的ip提供给客户端来将客户端导航到它。 但是,当dataNode主机被配置为具有多个ip,并且nameNode给了你一个客户端无法访问的ip时,客户端会将dataNode添加到排除列表中,并向nameNode请求一个新的ip,最后所有的dataNode都被排除在外,你会得到这个错误。 所以,在尝试所有操作之前,请检查节点的ip设置!!!
#经验# #大数据#
