title: No data nodes are started
body: <p>I am trying to setup <em>Hadoop version 0.20.203.0</em> in a pseudo distributed configuration using the following guide: </p>
  
  <p><a href="http://www.javacodegeeks.com/2012/01/hadoop-modes-explained-standalone.html">http://www.javacodegeeks.com/2012/01/hadoop-modes-explained-standalone.html</a></p>
  
  <p>After running the <code>start-all.sh</code> script I run "jps".</p>
  
  <p>I get this output:</p>
  
  <pre><code>4825 NameNode
  5391 TaskTracker
  5242 JobTracker
  5477 Jps
  5140 SecondaryNameNode
  </code></pre>
  
  <p>When I try to add information to the hdfs using:</p>
  
  <pre><code>bin/hadoop fs -put conf input
  </code></pre>
  
  <p>I got an error:</p>
  
  <pre><code>hadoop@m1a2:~/software/hadoop$ bin/hadoop fs -put conf input
  12/04/10 18:15:31 WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/hadoop/input/core-site.xml could only be replicated to 0 nodes, instead of 1
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1417)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:596)
          at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:523)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1383)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1379)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAs(Subject.java:416)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1377)
  
          at org.apache.hadoop.ipc.Client.call(Client.java:1030)
          at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:224)
          at $Proxy1.addBlock(Unknown Source)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
          at $Proxy1.addBlock(Unknown Source)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSClient.java:3104)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2975)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2255)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2446)
  
  12/04/10 18:15:31 WARN hdfs.DFSClient: Error Recovery for block null bad datanode[0] nodes == null
  12/04/10 18:15:31 WARN hdfs.DFSClient: Could not get block locations. Source file "/user/hadoop/input/core-site.xml" - Aborting...
  put: java.io.IOException: File /user/hadoop/input/core-site.xml could only be replicated to 0 nodes, instead of 1
  12/04/10 18:15:31 ERROR hdfs.DFSClient: Exception closing file /user/hadoop/input/core-site.xml : org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/hadoop/input/core-site.xml could only be replicated to 0 nodes, instead of 1
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1417)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:596)
          at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:523)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1383)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1379)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAs(Subject.java:416)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1377)
  
  org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/hadoop/input/core-site.xml could only be replicated to 0 nodes, instead of 1
          at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1417)
          at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:596)
          at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:523)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1383)
          at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1379)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.security.auth.Subject.doAs(Subject.java:416)
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
          at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1377)
  
          at org.apache.hadoop.ipc.Client.call(Client.java:1030)
          at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:224)
          at $Proxy1.addBlock(Unknown Source)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:616)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
          at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
          at $Proxy1.addBlock(Unknown Source)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSClient.java:3104)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2975)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:2255)
          at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2446)
  </code></pre>
  
  <p>I am not totally sure but I believe that this may have to do with the fact that the datanode is not running.</p>
  
  <p>Does anybody know what I have done wrong, or how to fix this problem?</p>
  
  <p>EDIT: This is the datanode.log file:</p>
  
  <pre><code>2012-04-11 12:27:28,977 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: STARTUP_MSG:
  /************************************************************
  STARTUP_MSG: Starting DataNode
  STARTUP_MSG:   host = m1a2/139.147.5.55
  STARTUP_MSG:   args = []
  STARTUP_MSG:   version = 0.20.203.0
  STARTUP_MSG:   build = http://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203 -r 1099333; compiled by 'oom' on Wed May  4 07:57:50 PDT 2011
  ************************************************************/
  2012-04-11 12:27:29,166 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
  2012-04-11 12:27:29,181 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source MetricsSystem,sub=Stats registered.
  2012-04-11 12:27:29,183 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
  2012-04-11 12:27:29,183 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
  2012-04-11 12:27:29,342 INFO org.apache.hadoop.metrics2.impl.MetricsSourceAdapter: MBean for source ugi registered.
  2012-04-11 12:27:29,347 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Source name ugi already exists!
  2012-04-11 12:27:29,615 ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceIDs in /tmp/hadoop-hadoop/dfs/data: namenode namespaceID = 301052954; datanode namespaceID = 229562149
          at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:232)
          at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:147)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.startDataNode(DataNode.java:354)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.&lt;init&gt;(DataNode.java:268)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.makeInstance(DataNode.java:1480)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.instantiateDataNode(DataNode.java:1419)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.createDataNode(DataNode.java:1437)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.secureMain(DataNode.java:1563)
          at org.apache.hadoop.hdfs.server.datanode.DataNode.main(DataNode.java:1573)
  
  2012-04-11 12:27:29,617 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
  /************************************************************
  SHUTDOWN_MSG: Shutting down DataNode at m1a2/139.147.5.55
  ************************************************************/
  </code></pre>