部署CM报错(2):Formatting the name directories of the current NameNode. If the name directories are not e

本文解决了一个关于Hadoop HDFS服务中NameNode格式化失败的问题。问题出现于初次添加HDFS服务时,尝试重新安装时遇到错误。原因是先前的NameNode已格式化,需清除原有格式化数据。解决方案包括删除所有机器上的/dfs目录,然后重试格式化过程。

一、问题描述

第一次添加hdfs服务,有警告一个服务没有启动对。就删除了hdfs。然后重新安装hdfs服务,就报错

	
Formatting the name directories of the current NameNode. If the name directories are not empty, this is expected to fail.
Command (71) has failed
NameNode (hadoop)
Dec 29, 12:13:33 AM	2.66s	
Format
Failed to format NameNode.

 

二、问题原因

之前的namenode格式化了,所以这次不能格式化,需要把原来格式化的删除。

三、解决

1.在/dfs目录下有dn或者nn

[root@hadoop dfs]# ls /dfs/
nn  snn

删除三台机器(所有机器)的/dfs目录

rm -rf /dfs/

2.然后点击retry即可

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值