Support Questions
Find answers, ask questions, and share your expertise

Ambari metrics not starting

New Contributor

Ambari-server :

HDP: 2.4

Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 136, in <module> AmsCollector().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 219, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 50, in start ams_service('collector', action = 'start') File "/usr/lib/python2.6/site-packages/ambari_commons/", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/", line 81, in ams_service user=params.ams_user 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 158, in run self.run_action(resource, action) File "/usr/lib/python2.6/site-packages/resource_management/core/", line 121, in run_action provider_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-collector --config /etc/ambari-metrics-collector/conf start' returned 255. Wed Apr 27 14:28:31 IST 2016 Starting HBase.starting master, logging to /var/log/ambari-metrics-collector/ ambari-metrics-collector process status...ERROR: ambari-metrics-collector start failed. For more details, see /var/log/ambari-metrics-collector/ambari-metrics-collector.out:====================Error: Could not find or load main class org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer====================Collector out at: /var/log/ambari-metrics-collector/ambari-metrics-collector.out


@Sudeep Gupta

Please check if the "/usr/lib/ambari-metrics-collector/ambari-metrics-timelineservice-x.x.x.jar" exist ?

The class which is mentioned in the error is actually present inside that JAR.

Could not find or load main class org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer

New Contributor
Thank you for replying. I just checked the path . The directory /usr/lib/ambari-metrics-collector doesn't exist.
There are other directories like
If you can share any follow-up steps, it will be a great help..

As your log says that you are trying to start the "ambari-metrics-collector", So you should be having that directory existing?

ERROR: ambari-metrics-collector start failed. For more details, see /var/log/ambari-metrics-collector/ambari-metrics-collector.out

Can you please let us know how you installed the "ambari-metrics-collector" ? Is it installed in some other custom location?

Expert Contributor

/usr/lib/ambari-metrics-collector is the default location for the rpm install.

Please check rpm -qa | grep ambari-metrics

Sample output:

[root@c6403 vagrant]# rpm -qa | grep ambari-metrics ambari-metrics-collector- ambari-metrics-monitor- ambari-metrics-hadoop-sink-

You can reinstall the bits by doing

yum remove ambari-metrics-collector

yum install ambari-metrics-collector

Rising Star

thanks @swagle, It worked for me, too 🙂

New Contributor

Hi ,

I am facing similar issue with Ambari under Ubuntu 16.

I tried to check what ambari modules I have

$sudo dpkg -l | grep ambari 

I tried to use above solution i.e. to install ambari-metrics-collector but i am unable to see any such packages available for installation:

$apt-cache search ambari*
ambari-agent - Ambari Agent
ambari-infra-solr - Apache Ambari Project POM
ambari-infra-solr-client - Apache Ambari Project POM
ambari-logsearch-logfeeder - Apache Ambari Project POM
ambari-logsearch-portal - Apache Ambari Project POM
ambari-metrics-assembly - Ambari Metrics Assembly
ambari-server - Ambari Server

Any hints on this please.

Expert Contributor

Ubuntu packaging is different for AMS compared to CentOS. ambari-metrics-assembly is the package needed.

Can you make sure the bits exist? meaning ambari-metrics-assembly actually brings in the collectors jars under /usr/lib/ambari-metrics-collector/

New Contributor

Hi all,

I'm also affected by this on Ubuntu 16.04.03.

ambari-metrics-assembly is installed, but it does not create /usr/lib/ambari-metrics-collector.

If I manually create that folder (mkdir /usr/lib/ambari-metrics-collector) and then reinstall it (apt-get install --reinstall ambari-metrics-assembly), it correctly places the required jars in that folder. It seems there's something wrong with the deb package that causes it to silently fail to create the folder before trying to place the jars.

Expert Contributor

@James Elian Thanks for pointing out the specifics, would you mind creating an Apache Jira for this issue. We will try and reproduce this on our end and come up with a fix for this in 2.6.2