Namenode daemon not starting properly

0 votes

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 11 in Big Data Hadoop by digger
• 27,620 points

edited Jan 11 by Omkar 93 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 11 by Omkar
• 67,140 points

Related Questions In Big Data Hadoop

0 votes
1 answer

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

start-dfs.sh script, only starts the HDFS daemons. ...READ MORE

answered Apr 15, 2018 in Big Data Hadoop by Shubham
• 13,210 points
535 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,240 points
69 views
0 votes
1 answer

Hadoop MacOS: formatting namenode: Could not find or load main class

You need to point the HADOOP_PREFIX to ...READ MORE

answered Nov 13, 2018 in Big Data Hadoop by Omkar
• 67,140 points
86 views
0 votes
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,150 points
2,062 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,150 points
199 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,573 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,240 points
771 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
• 67,140 points
302 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
• 67,140 points
111 views