Namenode daemon not starting properly

–1 vote

When I issue the stop-dfs.sh commmand I get

Stopping namenodes on [localhost]
localhost: no namenode to stop
localhost: stopping datanode
Stopping secondary namenodes [0.0.0.0]
0.0.0.0: stopping secondarynamenode

In the namenode log, I found these errors:

WARN org.apache.hadoop.hdfs.server.common.Storage: Storage directory /tmp/hadoop/dfs/name does not exist
 WARN org.apache.hadoop.hdfs.server.namenode.FSNamesystem: Encountered exception loading fsimage
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible.
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:327)
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:215)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFSImage(FSNamesystem.java:975)
    at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.loadFromDisk(FSNamesystem.java:681)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.loadNamesystem(NameNode.java:585)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:645)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:812)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:796)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1493)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1559)

How to solve this?

Jan 12, 2019 in Big Data Hadoop by digger
• 26,740 points

edited Jan 12, 2019 by Omkar 3,386 views

1 answer to this question.

0 votes

Add this in your hdfs-site.xml

<property>
        <name>dfs.namenode.name.dir</name>
        <value>file:///home/"your-user-name"/hadoop</value> 
    </property>
    <property>
        <name>dfs.datanode.data.dir</name>
        <value>file:///home/"your-user-name"/datanode</value>   
    </property>

After this format your namenode by hdfs namenode -format command.

This should solve your problem

answered Jan 12, 2019 by Omkar
• 69,230 points

Related Questions In Big Data Hadoop

0 votes
1 answer

In my hadoop namenode is not starting

Hi@Aman, There may be many reasons behind this. ...READ MORE

answered Jul 22, 2020 in Big Data Hadoop by MD
• 95,460 points
1,179 views
0 votes
2 answers

start-dfs.sh command is not starting Hadoop JobTracker & TaskTracker

On which version of hadoop do you ...READ MORE

answered Jul 24, 2019 in Big Data Hadoop by Lokesh Singh
3,777 views
0 votes
1 answer

Namenode not getting started

You need to delete the contents of the ...READ MORE

answered Apr 23, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
2,135 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
• 11,380 points
10,931 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,460 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,357 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,390 points
4,553 views
0 votes
1 answer

Hadoop: Datanode not starting correctly

You can do the following method, copy to ...READ MORE

answered Nov 5, 2018 in Big Data Hadoop by Omkar
• 69,230 points
2,647 views
0 votes
1 answer

Hadoop: Not able to start Namenode

Stop all running server 1) stop-all.sh Edit the ...READ MORE

answered Nov 8, 2018 in Big Data Hadoop by Omkar
• 69,230 points
2,312 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