title: hadoop-1.2.1 namenode is not formatted
body: <p>I have installed hadoop 1.2.1 in Ubuntu 16 and configured as below: </p>
  
  <p>core-site.xml</p>
  
  <pre><code>&lt;property&gt;
      &lt;name&gt;fs.default.name&lt;/name&gt;
      &lt;value&gt;hdfs://localhost:8020&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
      &lt;value&gt;tmpDir/snadikop/hadoopdata&lt;/value&gt;
  </code></pre>
  
  <h2>    </h2>
  
  <p>hdfs-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
      &lt;name&gt;dfs.replication&lt;/name&gt;
      &lt;value&gt;1&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <h2></h2>
  
  <p>mapred-site.xml</p>
  
  <pre><code>&lt;configuration&gt;
  &lt;property&gt;
      &lt;name&gt;mapred.job.tracker&lt;/name&gt;
      &lt;value&gt;localhost:8021&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p></p>
  
  <p>when I started first time, everything's working fine. but when I restarted the system, and when I tried to start the daemons namenode is not starting.</p>
  
  <p>tried</p>
  
  <pre><code>hadoop namenode -format 
  </code></pre>
  
  <p>command 
  and tried </p>
  
  <pre><code>sudo chown snadikop tmpDir/snadikop/hadoopdata
  sudo chmod 750 tmpDir/snadikop/hadoopdata
  </code></pre>
  
  <p>where 
     snadikop
  is the user.
  Still couldn't solve this issue.
  please help me with this issue?</p>
  
  <p>Thank you.</p>
  
  <p>Below is my log file</p>
  
  <pre><code>2017-03-02 18:07:01,185 ERROR org.apache.hadoop.hdfs.server.namenode.FSNamesystem: FSNamesystem initialization failed.
  java.io.IOException: NameNode is not formatted.
      at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:331)
      at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:104)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:427)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.&lt;init&gt;(FSNamesystem.java:395)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:299)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.&lt;init&gt;(NameNode.java:569)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1479)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1488)
  2017-03-02 18:07:01,377 ERROR org.apache.hadoop.hdfs.server.namenode.NameNode: java.io.IOException: NameNode is not formatted.
      at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverTransitionRead(FSImage.java:331)
      at org.apache.hadoop.hdfs.server.namenode.FSDirectory.loadFSImage(FSDirectory.java:104)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.initialize(FSNamesystem.java:427)
      at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.&lt;init&gt;(FSNamesystem.java:395)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:299)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.&lt;init&gt;(NameNode.java:569)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1479)
      at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1488)
  
  2017-03-02 18:07:01,411 INFO org.apache.hadoop.hdfs.server.namenode.NameNode: SHUTDOWN_MSG: 
  </code></pre>
  
  <p>and this is what happening in the terminal</p>
  
  <pre><code>snadikop@satish-vb:~$ jps
  11492 NameNode
  11654 DataNode
  11863 Jps
  11818 SecondaryNameNode
  snadikop@satish-vb:~$ jps
  11654 DataNode
  11880 Jps
  11818 SecondaryNameNode
  snadikop@satish-vb:~$ 
  </code></pre>
  
  <p>below are the screenshots locations of 'name' and 'data' folders.
  <a href="https://i.stack.imgur.com/vsZQm.png" rel="nofollow noreferrer">'name' folder path</a>
  I have doubt regarding this, whether both has to be in same folder or not.</p>
  
  <p><a href="https://i.stack.imgur.com/3gmEE.jpg" rel="nofollow noreferrer">'data' folder path </a></p>