After several NameNode execution format DataNode not start Solution

1. Problem

After performing start-dfs.sh view jps in the process, found NameNode start, but no DataNode

2. reasons

See .log file failed inconsistencies clusterID and namenode of datanode of clusterID

The reason may be multiple Hadoop namenode -format lead to inconsistent clusterID

3. Solution

1) go profile hdfs-site.xml path seen in hadoop dfs.datanode.data.dir address and the address of the dfs.namenode.name.dir

默认:file://${hadoop.tmp.dir}/dfs/name、file://${hadoop.tmp.dir}/dfs/data

2) obtained in clusterID ... / name / current / VERSION of

[root@hadoop201 current]# more VERSION 
#Mon Sep 02 18:06:26 CST 2019
namespaceID=1033971221
clusterID=CID-98e754ef-ad92-49f8-88b2-6830888f2d48
cTime=0
storageType=NAME_NODE
blockpoolID=BP-1400239548-192.168.1.201-1567418785939
layoutVersion=-63

3) The changes to the clusterID ... / dfs / data / current / VERSION

[root@hadoop201 current]# vi VERSION 
#Sun Sep 01 19:46:01 CST 2019
storageID=DS-330d79ed-7c1b-4d40-b151-81ffcadcf9f0
#clusterID=CID-ae479da3-0b1e-44b0-a383-029a213b3481
clusterID=CID-98e754ef-ad92-49f8-88b2-6830888f2d48
cTime=0
datanodeUuid=67fcc2ae-1b74-46cd-90df-336a0b1950e6
storageType=DATA_NODE
layoutVersion=-56

4) Start DataNode again, the successful launch

[root@hadoop201 hadoop-2.7.2]# sbin/hadoop-daemon.sh start datanode
starting datanode, logging to /opt/module/hadoop-2.7.2/logs/hadoop-root-datanode-hadoop201.com.out
[root@hadoop201 hadoop-2.7.2]# jps
11525 DataNode
10809 QuorumPeerMain
11001 NameNode
11598 Jps

 

Guess you like

Origin www.cnblogs.com/MWCloud/p/11448138.html