“格式化HDFS后,HMaster进程启动失败”的问题解决

用 hadoop namenode -fromat 格式化后,用./start-hbase.sh 启动HMaster和HRegionServer,但是过几秒种后HMaster进程自动关闭,HRegionServer进程没有关闭,查看日志报如下错:

2017-10-24 01:05:08,923 DEBUG [main-SendThread(remote:2181)] zookeeper.ClientCnxn: Reading reply sessionid:0x15f4c767f3a0008, packet:: clientPath:null serverPath:null finished:false header:: 111,2  replyHeader:: 111,727,0  request:: '/hbase/table-lock/hbase:namespace/write-master:160200000000004,0  response:: null
2017-10-24 01:05:08,924 DEBUG [remote:16020.activeMasterManager] lock.ZKInterProcessLockBase: Released /hbase/table-lock/hbase:namespace/write-master:160200000000004
2017-10-24 01:05:08,924 FATAL [remote:16020.activeMasterManager] master.HMaster: Failed to become active master
org.apache.hadoop.hbase.TableExistsException: hbase:namespace
	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.checkAndSetEnablingTable(CreateTableHandler.java:151)
	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.prepare(CreateTableHandler.java:124)
	at org.apache.hadoop.hbase.master.TableNamespaceManager.createNamespaceTable(TableNamespaceManager.java:233)
	at org.apache.hadoop.hbase.master.TableNamespaceManager.start(TableNamespaceManager.java:86)
	at org.apache.hadoop.hbase.master.HMaster.initNamespace(HMaster.java:868)
	at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:719)
	at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:165)
	at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1425)
	at java.lang.Thread.run(Thread.java:745)
2017-10-24 01:05:08,926 FATAL [remote:16020.activeMasterManager] master.HMaster: Master server abort: loaded coprocessors are: []
2017-10-24 01:05:08,926 FATAL [remote:16020.activeMasterManager] master.HMaster: Unhandled exception. Starting shutdown.
org.apache.hadoop.hbase.TableExistsException: hbase:namespace
	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.checkAndSetEnablingTable(CreateTableHandler.java:151)
	at org.apache.hadoop.hbase.master.handler.CreateTableHandler.prepare(CreateTableHandler.java:124)
	at org.apache.hadoop.hbase.master.TableNamespaceManager.createNamespaceTable(TableNamespaceManager.java:233)
	at org.apache.hadoop.hbase.master.TableNamespaceManager.start(TableNamespaceManager.java:86)
	at org.apache.hadoop.hbase.master.HMaster.initNamespace(HMaster.java:868)
	at org.apache.hadoop.hbase.master.HMaster.finishActiveMasterInitialization(HMaster.java:719)
	at org.apache.hadoop.hbase.master.HMaster.access$500(HMaster.java:165)
	at org.apache.hadoop.hbase.master.HMaster$1.run(HMaster.java:1425)
	at java.lang.Thread.run(Thread.java:745)

  是因为zookeeper中某些文件遗留的原因导致的呢?所以我将dataDir=/opt/zookeeper-3.4.5/data 目录下的version-2给删除,并且重启了服务器。然后重启开启后,HMaster进程正常运行。再打开 dataDir=/opt/zookeeper-3.4.5/data目录发现产生了新的version-2  .

转载于:https://www.cnblogs.com/royfans/p/7722997.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值