My hadoop system stops in initializing

Symptoms

When I run the “start-all.sh” to boot the cluster, It freezes to “Initializing” status and never goes into Running status. If I stop the cluster by running “stop-all.sh”, the message “No datanode to stop” is displayed.

Solutions

Unfortunately, the reason of this error is not clear. Just reset your HDFS system: clear all HDFS related directories set with configuration variables listed below and restart your hdfs daemon.

  • hadoop.tmp.dir (in conf/core-site.xml) : This variable specified the temporary directory that will be used on running hadoop operations.
  • dfs.name.dir (in conf/hdfs-site.xml) : This variable specifies the directory which hdfs namenode data. (The HDFS name table is stored in the directory specified by this parameter, on the master node.)
  • dfs.data.dir  (in conf/hdfs-site.xml) : This variable specifies the directory which holds hdfs data. The HDFS data will be stored in the directory specified by this parameter on each of slave node.

To avoid critial situation, I strongly recommend you to backup whole hdfs data into secure storage periodically. It is the only way to avoid data loss.