Home Forums HDP on Linux – Installation Namenode and HistoryServer start but stop immediately in Ambari 1.4.1

This topic contains 6 replies, has 3 voices, and was last updated by  Mariví Peláez-Alonso 9 months, 3 weeks ago.

  • Creator
    Topic
  • #44896

    Hi,

    I’m trying to install an small-testing HDP cluster (only 4 nodes), using ambari 1.4.1.61 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.

Viewing 6 replies - 1 through 6 (of 6 total)

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

  • Author
    Replies
  • #45086

    Hi Dave,

    Finally, I left data directories as follows:
    - dfs.namenode.name.dir = /var/hadoop/hdfs/namenode
    - dfs.datanode.data.dir = /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,
    Mariví

    Collapse
    #45081

    Dave
    Moderator

    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,

    Thanks

    Dave

    Collapse
    #45075

    Hi,
    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.edits.dir
    ${dfs.namenode.checkpoint.dir} == /var/hadoop/hdfs/namesecondary

    [some-properties]

    dfs.namenode.name.dir
    /var/hadoop/hdfs/namenode,/var/log/hadoop/hdfs/namenode,/var/log/audit/hadoop/hdfs/namenode

    [some-properties]

    dfs.datanode.data.dir
    /var/hadoop/hdfs/data,/var/log/hadoop/hdfs/data,/var/log/audit/hadoop/hdfs/data

    [some-properties]

    Thanks in advance.

    Kind regards,
    Mariví

    Collapse
    #45074

    Dave
    Moderator

    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?

    Thanks

    Dave

    Collapse
    #45073

    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 (StringUtils.java:startupShutdownMessage(601)) - STARTUP_MSG:
    /************************************************************
    STARTUP_MSG: Starting NameNode
    STARTUP_MSG: host = /
    STARTUP_MSG: args = []
    STARTUP_MSG: version = 2.2.0.2.0.6.0-76
    STARTUP_MSG: classpath =
    STARTUP_MSG: build = git@github.com:hortonworks/hadoop.git -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 (SignalLogger.java:register(91)) - registered UNIX signal handlers for [TERM, HUP, INT]
    [some-info-logs]
    2013-12-09 12:48:21,828 WARN common.Util (Util.java:stringAsURI(56)) - Path /tmp/hadoop/hdfs/namenode should be specified as a URI in configuration files. Please update hdfs configuration.
    [some-similar-logs-about some paths]
    [some-info-logs]
    2013-12-09 12:48:22,338 WARN common.Storage (Storage.java:analyzeStorage(439)) - Storage directory /tmp/hadoop/hdfs/namenode does not exist
    [some-info-logs]
    2013-12-09 12:48:22,466 FATAL namenode.NameNode (NameNode.java:main(1325)) - 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(FSImage.java:292)
    2013-12-09 12:48:22,474 INFO util.ExitUtil (ExitUtil.java:terminate(124)) - 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

    Collapse
    #44897

    Kenny Zhang
    Moderator

    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/hadoop-daemon.sh –config $HADOOP_CONF_DIR start namenode”

    Please share the output of this.

    Thanks,
    Kenny

    Collapse
Viewing 6 replies - 1 through 6 (of 6 total)