博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hadoop多次格式化后,导致datanode启动不了
阅读量:4882 次
发布时间:2019-06-11

本文共 3879 字,大约阅读时间需要 12 分钟。

hadoop namenode -format

多次格式化后,datanode启动不了

org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /user/beifeng/core-site.xml._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.        at org.apache.hadoop.hdfs.server.blockmanagement.BlockManager.chooseTarget(BlockManager.java:1471)        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:2791)        at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.addBlock(NameNodeRpcServer.java:606)        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.addBlock(ClientNamenodeProtocolServerSideTranslatorPB.java:455)        at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java)        at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2013)        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2009)        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:1614)        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2007)        at org.apache.hadoop.ipc.Client.call(Client.java:1411)        at org.apache.hadoop.ipc.Client.call(Client.java:1364)        at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)        at com.sun.proxy.$Proxy14.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:606)        at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)        at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)        at com.sun.proxy.$Proxy14.addBlock(Unknown Source)        at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.addBlock(ClientNamenodeProtocolTranslatorPB.java:368)        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.locateFollowingBlock(DFSOutputStream.java:1449)        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.nextBlockOutputStream(DFSOutputStream.java:1270)        at org.apache.hadoop.hdfs.DFSOutputStream$DataStreamer.run(DFSOutputStream.java:526)put: File /user/beifeng/core-site.xml._COPYING_ could only be replicated to 0 nodes instead of minReplication (=1).  There are 0 datanode(s) running and no node(s) are excluded in this operation.

 

0.20.2版本解决方式:

1、查看名称节点上(即在配置文件中配置的hadoop.tmp.dir参数路径)/usr/hadoop0.20.2/hadoop-huanghz/dfs/name/current/文件夹中VERSION文件中的namespaceid;
2、在两个数据节点修改上dfs.data.dir配置的路径下current文件夹中的VERSION文件namespaceid与名称节点保持一致
2.20版本解决
/data/hadoop/dfs/name/current/VERSION
用name下面的clusterID,修改datanode的/data/hadoop/dfs/data/current/VERSION 里面的clusterID
每次格式化,name下面的VERSION的clusterID会产生一个新的ID,要去修改各个节点的VERSION的clusterID 

……/dfs/data/current

storageID=DS-1959445666-10.161.138.100-50010-1386493413986
clusterID=CID-64a3a726-29e4-4d80-86a6-035ef33a225b
cTime=0
storageType=DATA_NODE
layoutVersion=-47
……/dfs/name/current/VERSION
#Fri Jan 03 10:37:48 CST 2014
namespaceID=1667984727
clusterID=CID-42c6d540-c3ca-44df-95e8-01a6d87effb5
cTime=0
storageType=NAME_NODE
blockpoolID=BP-220196921-10.161.138.100-1388716668863
layoutVersion=-47

转载于:https://www.cnblogs.com/yeahwell/p/5642798.html

你可能感兴趣的文章
百度外卖 前端面试题
查看>>
record for json formate site
查看>>
查询树形的根节点
查看>>
HDU 1272 小希的迷宫
查看>>
hdu 5412 CRB and Queries(整体二分)
查看>>
CentOS如何安装linux桌面?
查看>>
Speech and Booth Demo in Maker Faire Shenzhen 2018
查看>>
bzoj 1670: [Usaco2006 Oct]Building the Moat护城河的挖掘
查看>>
bzoj 2281: [Sdoi2011]黑白棋
查看>>
bzoj 4475: [Jsoi2015]子集选取
查看>>
团队开发7
查看>>
java之静态代理与动态代理
查看>>
软件测试2019:第四次作业
查看>>
201571030335 + 小学四则运算练习软件项目报告
查看>>
不用代码就能实现get与post
查看>>
gdb基本调试命令
查看>>
互联网开放平台API安全设计
查看>>
OPMN
查看>>
LOG收集系统(一):原日志至收集
查看>>
【文摘】经营十二条
查看>>