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

0 votes

I am trying to upload file in my hdfs cluster from client, but It shows me the below error. 

java.io.IOException: File /user/hadoop could only be replicated to 0 nodes, instead of 1
at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1448)
at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:690)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:342)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1350)
at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1346)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:742)
at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1344)

How can I solve this error?

Apr 17, 2020 in Big Data Hadoop by akhtar
• 38,260 points
1,439 views

1 answer to this question.

0 votes

Hi@akhtar,

To avoid this error, follow the bellow given steps.

  • Stop all hadoop services

  • Delete dfs/name and dfs/data directories

  • Run hadoop namenode -format  -Y

  • Start hadoop services again

Hope these steps will help you.

answered Apr 17, 2020 by MD
• 95,460 points

Related Questions In Big Data Hadoop

0 votes
1 answer

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

Try this, first stop all the daemons, ...READ MORE

answered Nov 6, 2018 in Big Data Hadoop by Omkar
• 69,220 points
3,502 views
0 votes
1 answer
0 votes
1 answer
+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
• 11,380 points
11,028 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
• 11,380 points
2,535 views
+2 votes
11 answers

hadoop fs -put command?

Hi, You can create one directory in HDFS ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by nitinrawat895
• 11,380 points
108,830 views
0 votes
1 answer

main" java.io.IOException: Mkdirs failed to create /user/hadoop/name.

Hi@akhtar,  I think you missed to add below property ...READ MORE

answered Apr 17, 2020 in Big Data Hadoop by MD
• 95,460 points
2,507 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP