1. HDFs machine Migration, implementation sbin/stop-dfs.sh
Error:
Dchadoop010.dx.momo.com:no Namenode to stop
Dchadoop009.dx.momo.com:no Namenode to stop
Dchadoop010.dx.momo.com:no Datanode to stop
Dchadoop009.dx.momo.com:no Datanode to stop
Dchadoop011.dx.momo.com:no Datanode to stop
Stopping journal nodes [dchadoop009.dx.momo.com dchadoop010.dx.momo.com dchadoop011.dx.momo.com]
Dchadoop010.dx.momo.com:no Journalnode to stop
Dchadoop009.dx.momo.com:no Journalnode to stop
Dchadoop011.dx.momo.com:no Journalnode to stop
Stopping ZK Failover controllers on NN hosts [dchadoop009.dx.momo.com dchadoop010.dx.momo.com]
Dchadoop010.dx.momo.com:no Journalnode to stop
Dchadoop009.dx.momo.com:no ZKFC to stop
Cannot close
The reason for this is that Hadoop is based on the PID that is saved to the PID file at stop time. While the default process number is kept in/TMP, Linux defaults to deleting files from this directory at regular intervals (typically one months or about 7 days). Therefore, after the deletion of hadoop-dc-namenode.pid files, Namenode naturally can not find the datanode on this process. (The process ID file name for different processes will change)
Solve:
For this cluster shutdown, what we need to do is: first to ensure that the cluster is not loaded, then go to kill DATANODE/JOURNALNODE/ZKFC manually and finally kill Namenode (note order)
Permanent Solution:
Configuring Export Hadoop_pid_dir in the configuration file hadoop_env.sh resolves this problem.