Support Questions

Find answers, ask questions, and share your expertise

namenode start field with ambari

avatar
New Contributor

I installed HDP2.4 with ambari2.1.0,It is first time.then i restarted my notebook. NameNode not be start.

2016-05-26 12:07:26,882 - Directory['/var/run/hadoop/hdfs'] {'owner': 'hdfs', 'recursive': True}
2016-05-26 12:07:26,882 - Directory['/var/log/hadoop/hdfs'] {'owner': 'hdfs', 'recursive': True}
2016-05-26 12:07:26,882 - File['/var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid'] {'action': ['delete'], 'not_if': 'ambari-sudo.sh  -H -E test -f /var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid && ambari-sudo.sh  -H -E pgrep -F /var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid'}
2016-05-26 12:07:27,023 - Execute['ambari-sudo.sh su hdfs -l -s /bin/bash -c 'ulimit -c unlimited ;  /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config /usr/hdp/current/hadoop-client/conf start namenode''] {'environment': {'HADOOP_LIBEXEC_DIR': '/usr/hdp/current/hadoop-client/libexec'}, 'not_if': 'ambari-sudo.sh  -H -E test -f /var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid && ambari-sudo.sh  -H -E pgrep -F /var/run/hadoop/hdfs/hadoop-hdfs-namenode.pid'}
2016-05-26 12:07:31,432 - Must wait to leave safemode since High Availability is not enabled.
2016-05-26 12:07:31,432 - Stay in safe mode: False
2016-05-26 12:07:31,432 - Wait to leafe safemode since must transition from ON to OFF.
2016-05-26 12:07:31,433 - Execute['/usr/hdp/current/hadoop-hdfs-namenode/bin/hdfs dfsadmin -fs hdfs://node1:8020 -safemode get | grep 'Safe mode is OFF''] {'logoutput': True, 'tries': 115, 'user': 'hdfs', 'try_sleep': 10}
2016-05-26 12:07:38,161 - Retrying after 10 seconds. Reason: Execution of '/usr/hdp/current/hadoop-hdfs-namenode/bin/hdfs dfsadmin -fs hdfs://node1:8020 -safemode get | grep 'Safe mode is OFF'' returned 1. 
2016-05-26 12:07:51,692 - Retrying after 10 seconds. Reason: Execution of '/usr/hdp/current/hadoop-hdfs-namenode/bin/hdfs dfsadmin -fs hdfs://node1:8020 -safemode get | grep 'Safe mode is OFF'' returned 1.
1 ACCEPTED SOLUTION

avatar
Guru

How long has this been in this state? It looks like NN is up but still in safemode (it will be safemode until the threshold of blocks are reported ). You can take a look at Namenode UI (http://<NN Node>:50070) to see why it is in safemode. It will report how many blocks are reported and how many datanodes reported.

View solution in original post

3 REPLIES 3

avatar
Guru

How long has this been in this state? It looks like NN is up but still in safemode (it will be safemode until the threshold of blocks are reported ). You can take a look at Namenode UI (http://<NN Node>:50070) to see why it is in safemode. It will report how many blocks are reported and how many datanodes reported.

avatar
New Contributor

thanks, I changed my acount to hdfs and enter hdfs dfsadmin -safemode leave.

avatar
Guru

A better option is to check why it is in safemode in the first place. Most likely situation is missing blocks and DNs down but there is a reason why it was in safemode.