Namenode not getting started

user886908 picture user886908 · Nov 10, 2011 · Viewed 115.2k times · Source

I was using Hadoop in a pseudo-distributed mode and everything was working fine. But then I had to restart my computer because of some reason. And now when I am trying to start Namenode and Datanode I can find only Datanode running. Could anyone tell me the possible reason of this problem? Or am I doing something wrong?

I tried both bin/start-all.sh and bin/start-dfs.sh.

Answer

Ketan picture Ketan · Dec 8, 2011

I was facing the issue of namenode not starting. I found a solution using following:

  1. first delete all contents from temporary folder: rm -Rf <tmp dir> (my was /usr/local/hadoop/tmp)
  2. format the namenode: bin/hadoop namenode -format
  3. start all processes again:bin/start-all.sh

You may consider rolling back as well using checkpoint (if you had it enabled).