Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ambari Name Node Startup Fails when safe mode is on.

Tags:

hadoop

ambari

I'm having a weird issue trying to restart my hadoop cluster in Ambari after a reboot of all nodes. Despite not making any configuration changes the name node service fails to start with the error below.

> Fail: Execution of 'su -s /bin/bash - hdfs -c 'export
> PATH=$PATH:/usr/hdp/current/hadoop-client/bin ; hdfs --config
> /etc/hadoop/conf dfsadmin -safemode get' | grep 'Safe mode is OFF''
> returned 1.

I have looked around and found someone pointing to a non UTF-8 encoding issue but have not had any luck resolving this. Can someone tell me what this error means or how to debug it?

- Duncan Krebs

like image 327
Duncan Krebs Avatar asked Mar 24 '15 01:03

Duncan Krebs


People also ask

Why is NameNode in safe mode?

Safemode for the NameNode is essentially a read-only mode for the Hadoop Distributed File System (HDFS) cluster. NameNode might enter into Safemode for different reasons, such as the following: Available space is less than the amount of space required for the NameNode storage directory.


1 Answers

The name node service was failing to start because safe mode was on. After reading up on safe mode I realized that it is turned on when read only mode is necessary for the name node. I'm not sure what caused it to stay in safe mode but running this command below resolved my issue.

sudo -u hdfs hdfs dfsadmin -safemode leave

Hope this helps someone. - Duncan Krebs

like image 134
Duncan Krebs Avatar answered Sep 22 '22 03:09

Duncan Krebs