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.

Ambari metrics not starting

Highlighted

Ambari metrics not starting

New Contributor

Ambari-server : 2.2.1.1-70

HDP: 2.4

Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 136, in <module> AmsCollector().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_collector.py", line 50, in start ams_service('collector', action = 'start') File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/ams_service.py", line 81, in ams_service 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 158, in run self.run_action(resource, action) File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 121, 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-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/hbase-ams-master-prd-bluesky00.fractal.com.outVerifying 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

10 REPLIES 10
Highlighted

Re: Ambari metrics not starting

@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

Highlighted

Re: Ambari metrics not starting

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
ambari-metrics-hadoop-sink/
ambari-metrics-kafka-sink/
If you can share any follow-up steps, it will be a great help..
Highlighted

Re: Ambari metrics not starting

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?

Highlighted

Re: Ambari metrics not starting

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-2.2.0.0-1310.x86_64 ambari-metrics-monitor-2.2.0.0-1310.x86_64 ambari-metrics-hadoop-sink-2.2.0.0-1310.x86_64

You can reinstall the bits by doing

yum remove ambari-metrics-collector

yum install ambari-metrics-collector

Highlighted

Re: Ambari metrics not starting

Rising Star

thanks @swagle, It worked for me, too :)

Highlighted

Re: Ambari metrics not starting

New Contributor

Hi ,

I am facing similar issue with Ambari 2.6.0.0 under Ubuntu 16.

I tried to check what ambari modules I have

$sudo dpkg -l | grep ambari 
ambari-agent  				2.6.0.0-267
ambari-metrics-assembly			2.6.0.0-267

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.

Re: Ambari metrics not starting

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/

Highlighted

Re: Ambari metrics not starting

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.

Highlighted

Re: Ambari metrics not starting

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

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