Support Questions
Find answers, ask questions, and share your expertise
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

Starting Ambari Metrics Grafana: .... FAILED

New Contributor
stderr: /var/lib/ambari-agent/data/errors-337.txt
I am using HDP 2.4 with upgrade for ambari-server (version 2.2.1 to 2.2.2), all the services are working, i have also added the proper port forwarding for Grafana(3000), log states that at the time of starting Grafana-server , it is facing a failed attempt. Please help.
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 64, in <module>
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 219, in execute
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 43, in start
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 154, in __init__
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 124, in run_action
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/", line 238, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/", line 291, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of '/usr/sbin/ambari-metrics-grafana start' returned 1. Starting Ambari Metrics Grafana: .... FAILED

Thank you.

Expert Contributor

Can you provide Grafana logs, at /var/log/ambari-metrics-grafana/?

Also, can you check user permissions on the following directories?


It should be ams:hadoop.

New Contributor

Thanks a lot @Arvind Vijayan for your reply, but i came over with the problem. I found that there were two issues related to the system. 1st, ownership problem and 2nd, the port number 3000 was being used by some other service on my system (i am using virtual box to use the HDP platform) on the local (not VM) blocking the request and the port forwarding provided. After resolving these issues, it is working properly now.

can you help me i am also unable to see ambari-metrics-grafana in the UI. Can you help me out.


@Kumar Anshuman Could you please share what exactly you did to solve the problem? I have the exact one and struggled to solve. I posted my issue in :

New Contributor

There is a problem when using /usr/sbin/ambari-metrics-grafana becasue it uses "status -p $PID_FILE $NAME > /dev/null 2>&1" to check if grafana is alive... but if $PID_FILE doesn't exist it will return true too... I just added a file existence check before...

function isRunning() {

[ ! -f $PID_FILE ] && return 1

status -p $PID_FILE $NAME > /dev/null 2>&1


Javier R.


/usr/sbin/ambari-metrics-grafana launch isRunning function to check current Grafana state, but if $PID_FILE doesn't exist it will return 0 too, as if grafana is already running...