Cannot Start Namenode with Safemode Error

cannot start namenode

It’s so annoying when you see the namenode error above, and always showing the same error after restarting several times.

Fortunately, I found an answer online writen by a hortonworks staff.

cannot start namenode

So, we don’t need to worry about this kind of error, and we can use the command below to ignore this error.

1
hadoop dfsadmin -safemode leave 

Using the command below to get the state of the namenode

1
hdfs dfsadmin -safemode get 

Incorrect steps for stopping your Ambari cluster may casue this kind of error.
Following steps below can avoid.

  1. Clicking the button “Stop All”.

  2. Running the commands below.

    1
    2
    3
    ambari-agent stop

    ambari-server stop
  3. Powering off VMs.