Hadoop: ERROR datanode.DataNode: All directories in dfs.data.dir are invalid.

0 votes

jps shows only Namenode and secondary Namenode. Then I started datanode by

 bin$./hadoop datanode

Then got this error: ERROR datanode.DataNode: Alldirectories in dfs.data.dir are invalid.

Can anyone help out with the solutions to the above error?

Aug 5, 2019 in Big Data Hadoop by Jigar
125 views

1 answer to this question.

0 votes

Hi,

Try this, first delete all contents from temporary folder:

rm -rf /app/hadoop/tmp/​

Make sure that dir has right owner and permission /app/hadoop/tmp/

bin$sudo chown hduser:hadoop -R /app/hadoop/tmp/

bin$sudo chmod 777 -R /app/hadoop/tmp/

Format the namenode:

bin$./hadoop namenode -format

Start all processes again: 

bin$./start-all.sh​
answered Aug 5, 2019 by Gitika
• 25,440 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Copy files to all Hadoop DFS directories

Hi @Bhavish. There is no Hadoop command ...READ MORE

answered Feb 23, 2019 in Big Data Hadoop by Omkar
• 68,860 points
660 views
0 votes
2 answers

Hey for all, how to get on large data i want use in hadoop?

Hi, To work with Hadoop you can also ...READ MORE

answered Jul 30, 2019 in Big Data Hadoop by Sunny
67 views
+1 vote
1 answer
0 votes
1 answer

Is Kafka and Zookeeper are required in a Big Data Cluster?

Apache Kafka is one of the components ...READ MORE

answered Mar 22, 2018 in Big Data Hadoop by nitinrawat895
• 10,840 points
516 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,840 points
3,893 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,840 points
535 views
+1 vote
11 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
20,696 views
0 votes
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,290 points
1,464 views