Support Questions
Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.

Cannot write a file into the cluster. Could only be replicated to 0 nodes instead of minReplication (=1) error.

New Contributor

Hi guys! First of all, I am new in Hortonworks.

I try to write a file (CSV format) into the cluster but I got this error from the console.

File /user/hdfs/forPablo/erp.sql 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.

The file is created without data. I have checked these links but I do not work for me

and more... Please, anyone could help me? Thx!



@AA MJ, How many datanodes do you have in cluster ? As per message , it seams you only have one datanode. Ideally, you should have 3 datanodes atleast to manage replication correctly.

However, as per this message it means that you have only one data node and that data node is excluded. Can you please check content of /etc/hadoop/conf/dfs.hosts.exclude ? If the datanode is added to exclude host list, this behavior is expected.

If data node is not added to exclude list and still you are noticing issue with replication, you can restart the datanode and try again.