title: File jobtracker.info could only be replicated to 0 nodes, instead of 1
body: <p>I am trying to setup <code>Hadoop</code> cluster on <code>Fedora 17</code>.
  When I give <code>/bin/star-all.sh</code> command daemons are getting started on masters and slaves nodes. 
  But when I view log file for data node on master node I get following EROOR</p>
  
  <blockquote>
    <p>ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hadoop1 cause:java.io.IOException: <strong>File /home/hadoop1/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1</strong></p>
    
    <p>2013-03-23 15:37:08,205 INFO org.apache.hadoop.ipc.Server: IPC Server handler 5 on 9100, call addBlock(/home/hadoop1/mapred/system/jobtracker.info, DFSClient_-838454688, null) from 127.0.0.1:40173: error: java.io.IOException: File /home/hadoop1/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
    java.io.IOException: File /home/hadoop1/mapred/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1558)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696)
        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:601)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)</p>
  </blockquote>
  
  <p>I am also trying to run wordcound program. While copying data into HDFS using command</p>
  
  <p><strong>$bin/hadoop dfs -copyFromLocal /home/hadoop1/Documents/wordcount/   /home/hadoop1/hdfs/data</strong>
  I get following error</p>
  
  <blockquote>
    <p>WARN hdfs.DFSClient: DataStreamer Exception: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /home/hadoop1/hdfs/data/wordcount/pg20417.txt could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1558)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)</p>
  </blockquote>
  
  <pre><code>at org.apache.hadoop.ipc.Client.call(Client.java:1070)
  at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:225)
  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:601)
  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:3510)
  at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:3373)
  at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2600(DFSClient.java:2589)
  at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2829)
  </code></pre>
  
  <blockquote>
    <p>13/03/23 15:41:05 WARN hdfs.DFSClient: Error Recovery for block null bad datanode[0] nodes == null
    13/03/23 15:41:05 WARN hdfs.DFSClient: Could not get block locations. Source file "/home/hadoop1/hdfs/data/wordcount/pg20417.txt" - Aborting...
    copyFromLocal: java.io.IOException: File /home/hadoop1/hdfs/data/wordcount/pg20417.txt could only be replicated to 0 nodes, instead of 1
    13/03/23 15:41:05 ERROR hdfs.DFSClient: Exception closing file /home/hadoop1/hdfs/data/wordcount/pg20417.txt : org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /home/hadoop1/hdfs/data/wordcount/pg20417.txt could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1558)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)</p>
  </blockquote>
  
  <p>Help in this regard is appreciated..</p>