Namenode and Datanode are not starting in hadoop Namenode and Datanode are not starting in hadoop hadoop hadoop

Namenode and Datanode are not starting in hadoop


In your hdfs-site.xml file there should be dfs.data.dir property that points to a local directory. Delete everything under the directory and not the directory itself. Careful!! if you have any data on hdfs you will lose all of it.


Set the dfs.namenode.name.dir and dfs.datanode.data.dir in hdfs-site.xmland it looks like this:

 <property>   <name>dfs.namenode.name.dir</name>   <value>/<local-dir path>/namenode</value> </property> <property>   <name>dfs.datanode.data.dir</name>   <value>/<local-dir path>r/datanode</value> </property>

If already you have this folders in your directory then delete them and Restart your NameNode


  1. you should configure hadoop.tmp.dir in your core-site.xml file, and change its permissions to be accessible.

  2. you should configure dfs.data.dir property in your hdfs-site.xml file to point to a local directory, also change the permissions of that directory to be accessible.

  3. you should configure dfs.name.dir property in your hdfs-site.xml file to point to a local directory, also change the permissions of that directory to be accessible.

After doing above steps try formatting hdfs and starting hadoop. Note that you may not necessarily want to do the third step since your NameNode is already running.

Upon executing jps command you probably should be able to see your DataNode up and running...

33584 ResourceManager29907 33719 Jps33275 NameNode33469 SecondaryNameNode33677 NodeManager33359 DataNode