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

Ambari Metrics Won't Install

Expert Contributor

On a 6 node cluster, using Ambari 2.1.2/HDP 2.3.2.

Scenario 1:

When installing HDP and it goes to a point where it's installing the services across all nodes, it suddenly fails and it's due to Ambari Metrics/Monitors failing. Full stack trace below from Ambari UI.

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 131, 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 34, in install
    self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 395, in install_packages
    Package(name)
  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 152, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 45, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package
    shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
  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/bin/yum -d 0 -e 0 -y install ambari-metrics-collector' returned 1. Error: Nothing to do

Running the same command from the last line of the error yields the same response. There were no Ambari Metrics log generated. Ambari server log didn't any info.

Scenario 2:

I reset ambari-server and cleanup all hosts. Re-run ambari wizard and install all services except for Ambari Metrics. HDP installed successfully. I now added Ambari Metrics back and I'm getting the same error.

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 131, 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 34, in install
    self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 395, in install_packages
    Package(name)
  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 152, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 118, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 45, in action_install
    self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package
    shell.checked_call(cmd, sudo=True, logoutput=self.get_logoutput())
  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/bin/yum -d 0 -e 0 -y install ambari-metrics-collector' returned 1. Error: Nothing to do
28 REPLIES 28

Mentor

@rgarcia why can't you just all together

#drop the database and then retry if it fails

Then just yum remove postgresql* and reinstall yum install postgresql*

That could be much faster though I know the urge to know why is unavoidable

I am also getting the same issue when you say drop postgresql will it affect any other services.

What will be the exact steps to install ambari metrics I have installed the rest of the HDP things but metrics collector is saying nothing to do error.

I am getting the same error on Ambari metrics collector install "noting to do" can you please be more specific what are the steps to solve this issue. I have checked the repos all looks good and was able to deploy all other components of HDP now trying to install metrics collector and am stuck.

Help is highly appreciated.

New Contributor

As of Thu 3 Mar 2016 this continues to fail during fresh HDP 2.4 installation using Ambari

ambari-metrics-collector does not exist in the yum repositories

[root@donald ~]# date
Thu Mar  3 11:13:23 EST 2016
[root@donald ~]# 
[root@donald ~]# cat /etc/yum.repos.d/HDP.repo
[HDP-2.4]
name=HDP-2.4
baseurl=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.4.0.0
path=/
enabled=1
gpgcheck=0
[root@donald ~]# 
[root@donald ~]# cat /etc/yum.repos.d/HDP-UTILS.repo 
[HDP-UTILS-1.1.0.20]
name=HDP-UTILS-1.1.0.20
baseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6
path=/
enabled=1
gpgcheck=0 
[root@donald ~]# 
[root@donald ~]# yum search ambari-agent ambari-server ambari-metrics-collector
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: mirror.linux.duke.edu
 * epel: mirror.symnds.com
 * extras: mirror.millry.co
 * updates: mirror.dattobackup.com
========================== N/S Matched: ambari-agent ===========================
ambari-agent.x86_64 : Ambari Agent

========================== N/S Matched: ambari-server ==========================
ambari-server.x86_64 : Ambari Server

  Name and summary matches mostly, use "search all" for everything.
Warning: No matches found for: ambari-metrics-collector
[root@donald ~]# 

New Contributor

Same problem here installing HDP 2.4.

I think this might be related to manual install of ambari agents.

On my clients, i have AMBARI/HDP/HDP-UTILS local repositories but these are not enabled by default (several versions in .repo files.)

I believe Ambari server should --enablerepo=AMBARI-<VERSION> when installing ambari-metrics-collector, just like it does with HDP,HDP-UTILS.

For now i installed manually ambari-metrics-collector.

New Contributor

Please try to add back repositories

yum-config-manager --add-repo http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.1.0

New Contributor

Add the repository containing the updates. Refer to this link. Try to re-install metrics-collector.

https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_reference_guide/content/_download....

I hit the same issue. In my case I was missing the yum ambari repository. I fixed with the command below. This command works for ambari version 2.4.1.0 on Red Hat 7. Make sure you add the correct repo for your OS and ambari version.

yum-config-manager --add-repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.1.0/ambari.repo

New Contributor

,

1.add this command

yum-config-manager --add-repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.1.0/ambari.repo

2.

yum upgrade ambari-metrics-monitor ambari-metrics-hadoop-sink

3.

yum install ambari-metrics-hadoop-sink

Ambari-metrics installed