Search This Blog

Starting and stopping Ambari agents

In this article we will learn how to work with Ambari agents.We will learn how to start, stop , restart and some more operations of ambari agents from command line.
 If you are not using root user, you have to prefix sudo to all commands listed in below steps.

 1) Check the status of Ambari agents.

This command tells us wether Ambari agent is in running state or not. If  Ambari agent is in running state , Command also gives us pid of the Ambari agent process.

Command :

ambari-agent status

sudo ambari-agent status


service ambari-agent status

2) Stopping  Ambari agent

You can use any one of the commands to stop ambari agent.

sudo ambari-agent stop


ambari-agent stop


service ambari-agent stop

If ambari agent is stopped, Ambari server shows heart beat lost message for the node where ambari-agent is stopped.

3) Starting  Ambari agent

You can use any one of the commands to start ambari agent.

ambari-agent start


sudo ambari-agent start


service ambari-agent  start

Once ambari agent is started, heart beat issues in Ambari user interface will be fixed.

4) Restarting Ambari agent

You can use any one of the commands to restart ambari agent.

ambari-agent restart


sudo ambari-agent restart


service ambari-agent restart

5) Othe options

Ambari agent process also comes with some more commands, You can check them all using --help option.

ambari-agent --help


  1. Hi

    By mistake i deleted one file in ambari agent that is

    rm -f /run/ambari-agent/

    after that its showing this error

    ambari-agent restart
    Restarting ambari-agent
    Verifying Python version compatibility...
    Using python /usr/bin/python
    ambari-agent is not running. No PID found at /run/ambari-agent/
    Verifying Python version compatibility...
    Using python /usr/bin/python
    Checking for previously running Ambari Agent...
    Checking ambari-common dir...
    Starting ambari-agent
    Verifying ambari-agent process status...
    ERROR: ambari-agent start failed. For more details, see /var/log/ambari-agent/ambari-agent.out:
    No handlers could be found for logger "root"
    Failed to start ping port listener of: Could not open port 8670 because port already used by another process:
    root 23758 23754 0 Aug19 pts/4 00:00:17 /usr/bin/python /usr/lib/ambari-
    Agent out at: /var/log/ambari-agent/ambari-agent.out
    Agent log at: /var/log/ambari-agent/ambari-agent.log

  2. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts. Python Projects for Students Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account. Project Center in Chennai

  3. ambari-agent status
    asking for password, tried all still says incorrect ?