Home > other >  The problem of cluster structures can't find the namenode
The problem of cluster structures can't find the namenode

Time:09-25

Solve the problem of "no datanode to stop"
When I stop the Hadoop found the following information:
No datanode to stop
Reason: every time the namenode format to create a namenodeId and TMP/DFS/data contains the last time the format of the id, the namenode format to empty the data under the namenode, but there is no clear data under the datanode, cause the failure of startup, there are two solutions:
the first solution is as follows:
1) first remove "/usr/hadoop/TMP"
Rm - rf/usr/hadoop/TMP
2) create "/usr/hadoop/TMP folder
The mkdir/usr/hadoop/TMP
3) delete "/TMP" begin with "hadoop file under the
Rm - rf/TMP/hadoop *
4) to reformat the hadoop
Hadoop namenode - the format
5) start the hadoop
Start - all. Sh
Use the first solution is not good is the important data on the original cluster all have no, if say a Hadoop cluster has been running for a period of time,
Recommend the second,
the second scheme is as follows:
1) to modify each Slave clusterID makes it in accordance with the Master clusterID,
Or
2) modify the Master clusterID make it consistent with the Slave clusterID,
This "namespaceID" is located in "/home/ZKPK hadoopdata/DFS/name/current/VERSION" file, in front of a blue may change according to actual condition, but behind the red is generally the same,
For example: view the "Master" VERSION "under" file

I suggest using the second, so convenient and quick, but also can prevent mistakenly deleted,
summarize, actually could not find a datanode may often because of their structures, cluster when the formatting many times, of course not rule out machine sudden convulsions, cluster set format for the first time the namenode originally generated a clusterID, and copied to the child node, when accidentally formatted again lead to the namenode and datanode clusterID different, so there will be a start - all. Can't find the datanode sh,




CodePudding user response:

CodePudding user response:

If this is the problem, might as well try ha, tencent cloud server version and a professional cluster structures, tutorial, the effect is very satisfactory,
  • Related