Hadoop: java.io.IOException: File could only be replicated to 0 nodes instead of minReplication (=1)

0 votes

While running a job i am getting the following given below error ,

java.io.IOException: File /user/ashsshar/olhcache/loaderMap9b663bd9 could only be replicated to 0 nodes instead of minReplication (=1). There are 3 datanode(s) running and 3 node(s) are excluded in this operation. at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1325)

I tried restarting the DataNodes but I still get the same error. 

PS: There is a lot of space available

Nov 6, 2018 in Big Data Hadoop by slayer
• 29,270 points
913 views

1 answer to this question.

0 votes

Try this, first stop all the daemons, remove all the file from /var/lib/hadoop-hdfs/cache/hdfs/dfs/name, format the Namenode and start the daemons:

for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x stop ; done
sudo rm -r /var/lib/hadoop-hdfs/cache/
sudo -u hdfs hdfs namenode -format
for x in `cd /etc/init.d ; ls hadoop*` ; do sudo service $x start ; done
answered Nov 6, 2018 by Omkar
• 69,040 points

Related Questions In Big Data Hadoop

0 votes
1 answer

java.io.IOException: File /user/hadoop/ could only be replicated to 0 nodes, instead of 1

Hi@akhtar, To avoid this error, follow the bellow ...READ MORE

answered Apr 17 in Big Data Hadoop by MD
• 31,350 points
98 views
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,249 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
764 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
31,914 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
1,971 views
0 votes
1 answer

How to check the size of a file in Hadoop HDFS?

You can use the  hadoop fs -ls command to ...READ MORE

answered Nov 21, 2018 in Big Data Hadoop by Omkar
• 69,040 points
2,221 views
0 votes
1 answer

Hadoop: namenode -format error "java.io.IOException"

Run the command as sudo or add the ...READ MORE

answered Nov 26, 2018 in Big Data Hadoop by Omkar
• 69,040 points
613 views