The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

HDP on Linux – Installation Forum

Namenode and HistoryServer start but stop immediately in Ambari 1.4.1

  • #44896


    I’m trying to install an small-testing HDP cluster (only 4 nodes), using ambari with the 2.0.6 stack, on RHEL6 and using OpenJDK7 by default. Finally we have been able to install it, but the start and test phases of the wizard ended with some warnings. When we accessed ambari-server UI we found out that HistoryServer and NameNode were not running. We tried to start them individually and they seemed to start, but after a while they stopped. The rest of the services are up and running.

    This is my very first time using HDP and it is being very difficult to follow what is happening: in ambari-server and ambari-agents logs there were no information about the errors. I cannot find the log file for the NameNode, that, I believe, might be in /var/log/hadoop/hdfs, but there are only logs related to the SecondaryNameNode, that is up and running. In the end, I have no clues on what is actually happening. I also tried to follow the troubleshooting points, but nothing seems to be related to this particular case.

    Finally, I repeated the full installation three times, but the result is the same.

    Could someone give me some advice on how to debug it?

    Thanks a lot.

  • Author
  • #44897
    Kenny Zhang

    Hi Marivi,

    Do you have namenode HA enable?

    If only the HistoryServer and NameNode are not runnig, how about the datanode?
    Could you please share the namenode log /var/log/hadoop/hdfs/hadoop-hdfs-namenode-*.log, which should be in the namenode server?
    If you cannot find it, could you please try to run the below command to start NN manually?
    su -l hdfs -c “/usr/lib/hadoop/sbin/ –config $HADOOP_CONF_DIR start namenode”

    Please share the output of this.



    Hi Kenny,
    Thanks for your response and sorry for my delay: I was out of the office and didn’t receive the notification of your response by email.

    I did not have namenode HA enable.
    All three datanodes are up and running.
    As I mentioned, the namenode log didn’t exist. So I’ve just executed the namenode manually and here is its output:

    cat /var/log/hadoop/hdfs/hadoop-hdfs-namenode-host.out
    ulimit -a for user hdfs
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 30509
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 32768
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 10240
    cpu time (seconds, -t) unlimited
    max user processes (-u) 65536
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

    cat /var/log/hadoop/hdfs/hadoop-hdfs-namenode-host.log
    2013-12-09 12:48:18,581 INFO namenode.NameNode ( - STARTUP_MSG:
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG: host = /
    STARTUP_MSG: args = []
    STARTUP_MSG: version =
    STARTUP_MSG: classpath =
    STARTUP_MSG: build = -r 8656b1cfad13b03b29e98cad042626205e7a1c86; compiled by 'jenkins' on 2013-10-18T00:19Z
    STARTUP_MSG: java = 1.7.0_09-icedtea
    2013-12-09 12:48:18,604 INFO namenode.NameNode ( - registered UNIX signal handlers for [TERM, HUP, INT]
    2013-12-09 12:48:21,828 WARN common.Util ( - Path /tmp/hadoop/hdfs/namenode should be specified as a URI in configuration files. Please update hdfs configuration.
    [some-similar-logs-about some paths]
    2013-12-09 12:48:22,338 WARN common.Storage ( - Storage directory /tmp/hadoop/hdfs/namenode does not exist
    2013-12-09 12:48:22,466 FATAL namenode.NameNode ( - Exception in namenode join
    org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop/hdfs/namenode is in an inconsistent state: storage directory does not exist or is not accessible.
    at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(
    2013-12-09 12:48:22,474 INFO util.ExitUtil ( - Exiting with status 1

    Ambari is being executed as root. /tmp/hadoop/hdfs is owned by root (with drwxr-xr-x) and it only contains a directory namesecondary owned by hdfs.

    Kind regards


    Hi Marivi,

    Why are you using /tmp/hadoop/hdfs/namenode as your data directory?
    This should be configured through Ambari and should not point to a temporary directory.
    Can you attach your hdfs-site.xml here?




    I’m using /tmp/hadoop/hdfs/namenode as data directory, because I just reviewed Oozie and Nagios configurations during the startup. For the rest, I left them by default, because I supposed they contained something coherent: That’s my fault. Here you are $HADOOP_CONF_DIR/hdfs-site.xml. I’ve just remove /tmp/hadoop/hdfs/… from namenode, secondarynamenode and datanode configurations. I’ve tried to restart the services but they failed again, because /var/hadoop/hdfs/namenode could not be created, although /var/hadoop/hdfs/namesecondary, in the same host, is there.

    ${dfs.namenode.checkpoint.dir} == /var/hadoop/hdfs/namesecondary




    Thanks in advance.

    Kind regards,


    Hi Marivi,

    Have you used this instance before?
    You may have to format the namenode for it to run correctly:

    hadoop namenode -format

    Let me know if this helps,




    Hi Dave,

    Finally, I left data directories as follows:
    – = /var/hadoop/hdfs/namenode
    – = /var/hadoop/hdfs/data

    I restarted all the services and they worked like a charm.

    I did not execute hadoop namenode -format, but I’m not pretty sure if it’s needed, now that it is working.

    Thank you very much, because you led me to the solution.

    Kind regards,

The topic ‘Namenode and HistoryServer start but stop immediately in Ambari 1.4.1’ is closed to new replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.