hadoop错误之二:could only be replicated to 0 nodes, instead of 1
WARN hdfs.DFSClient: NotReplicatedYetException sleeping /user/administrator/chen3/NOTICE.txt retries left 2
10/01/07 19:50:23 INFO hdfs.DFSClient: org.apache.hadoop.ipc.RemoteException: java.io.IOException: File /user/administrator/xp/NOTICE.txt could only be replicated to 0 nodes, instead of 1
? ? at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1270)
? ? at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:351)
? ? at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
? ? at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
? ? at java.lang.reflect.Method.invoke(Method.java:597)
? ? at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:452)
? ? at org.apache.hadoop.ipc.Server$Handler.run(Server.java:892)
? ? at org.apache.hadoop.ipc.Client.call(Client.java:696)
? ? at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:216)
? ? at $Proxy0.addBlock(Unknown Source)
? ? at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
? ? at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
? ? at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
? ? at java.lang.reflect.Method.invoke(Method.java:597)
? ? at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:82)
? ? at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:59)
? ? at $Proxy0.addBlock(Unknown Source)
? ? at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.locateFollowingBlock(DFSClient.java:2815)
? ? at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.nextBlockOutputStream(DFSClient.java:2697)
? ? at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream.access$2000(DFSClient.java:1997)
? ? at org.apache.hadoop.hdfs.DFSClient$DFSOutputStream$DataStreamer.run(DFSClient.java:2183)
10/01/07 19:50:23 WARN hdfs.DFSClient: NotReplicatedYetException sleeping /user/administrator/chen3/NOTICE.txt retries left 1
?
出现这种错误的主要原因是:
?1、$hadoop/conf/ 下的配置文件没有配置正确!
?2、在做format的时候出现错误!
解决办法:
?1、查找$hadoop/conf/ 配置文件,看看那个文件有没有写错或者是配置不正确!
? 2、删除 /tmp/ 下的所有文件,从新format。
1 楼 fj1002817 2011-05-08 是因为namenode宕了,可以不用删除tmp下的所有东西,这里面还包含了操作系统的一些设置,全删除了下次启动还要初始化,开机速度比较慢,只要删除登陆账户的相关hadoop pid就可以了。 2 楼 p_x1984 2011-05-08 多谢提醒!