6

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

Duncan Krebs
  • 3,366
  • 2
  • 33
  • 53

1 Answers1

13

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

Duncan Krebs
  • 3,366
  • 2
  • 33
  • 53