Reasons why the NameNode fails to start and solutions
Problem: After starting Hadoop, I checked with JPS and found no NameNode
The NAMenode Format creates a new NAMenodeld every time, and TMP/DFS /data contains the ID under the last format. The Namenode Format clears the data under the Namenode, but does not clean the data under the Datanode, which causes startup failure.
Solutions:
- stop running hadoop
stop -dfs.sh
- delete the file items mapped by hadoop.tmp.dir in the core-site configuration file, generally hadoop/ TMP folder
sudo rm -r tmp
- performs formatting
./bin/hdfs namenode -format
- restart
start-hdfs.sh