Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Starting Ambari Metrics Grafana: .... FAILED

Highlighted

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/metrics_grafana.py", line 64, in <module>
    AmsGrafana().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_grafana.py", line 43, in start
    user=params.ams_user
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", 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/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", 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.
5 REPLIES 5
Highlighted

Re: Starting Ambari Metrics Grafana: .... FAILED

Expert Contributor

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

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

/var/lib/ambari-metrics-grafana
/etc/ambari-metrics-grafana/conf
/var/log/ambari-metrics-grafana

It should be ams:hadoop.

Highlighted

Re: Starting Ambari Metrics Grafana: .... FAILED

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.

Highlighted

Re: Starting Ambari Metrics Grafana: .... FAILED

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

Re: Starting Ambari Metrics Grafana: .... FAILED

Explorer

@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 :https://community.hortonworks.com/questions/97862/garafana-faild-to-start.html#answer-98481.

Highlighted

Re: Starting Ambari Metrics Grafana: .... FAILED

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...

Don't have an account?
Coming from Hortonworks? Activate your account here