Apache Metrics Collector install failed while deploying Apache Ambari 2.5.1

别说谁变了你拦得住时间么 提交于 2019-12-11 15:17:37

问题


I've tried to deploy Apache Ambari 2.5.1, and Apache Metrics Collector install failed. I have researched this issue and I can not find the same issue in the Internet. Can you help me to solve this problem? Thanks!

stderr:

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 86, in <module> AmsCollector().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 329, in execute method(env)
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py", line 36, in install self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 693, in install_packages retry_count=agent_stack_retry_count)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, 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/package/__init__.py", line 54, 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 51, in install_package self.checked_call_with_retries(cmd, sudo=True, logoutput=self.get_logoutput())
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 86, in checked_call_with_retries return self._call_with_retries(cmd, is_checked=True, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 98, in _call_with_retries code, out = func(cmd, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-collector' returned 1. 
Error: Nothing to do

stdout:

2017-07-19 17:09:34,336 - Stack Feature Version Info: stack_version=2.6, version=None, current_cluster_version=None -> 2.6
2017-07-19 17:09:34,338 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf User Group mapping (user_group) is missing in the hostLevelParams
2017-07-19 17:09:34,341 - Group['livy'] {}
2017-07-19 17:09:34,343 - Group['spark'] {}
2017-07-19 17:09:34,343 - Group['hadoop'] {}
2017-07-19 17:09:34,344 - Group['users'] {}
2017-07-19 17:09:34,344 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,345 - User['livy'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,345 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,346 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,347 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,348 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2017-07-19 17:09:34,348 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']}
2017-07-19 17:09:34,349 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,350 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,350 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,351 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']}
2017-07-19 17:09:34,352 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-07-19 17:09:34,354 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2017-07-19 17:09:34,361 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if
2017-07-19 17:09:34,362 - Group['hdfs'] {}
2017-07-19 17:09:34,363 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hadoop', 'hdfs']}
2017-07-19 17:09:34,363 - FS Type: 
2017-07-19 17:09:34,364 - Directory['/etc/hadoop'] {'mode': 0755}
2017-07-19 17:09:34,395 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2017-07-19 17:09:34,396 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2017-07-19 17:09:34,421 - Initializing 2 repositories
2017-07-19 17:09:34,422 - Repository['HDP-2.6'] {'base_url': 'http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.3.0-63', 'action': ['create'], 'components': ['HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': None}
2017-07-19 17:09:34,430 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.6]\nname=HDP-2.6\nbaseurl=http://s3.amazonaws.com/dev.hortonworks.com/HDP/centos6/2.x/BUILDS/2.6.3.0-63\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-07-19 17:09:34,432 - Repository['HDP-UTILS-1.1.0.21'] {'base_url': 'http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6', 'action': ['create'], 'components': ['HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None}
2017-07-19 17:09:34,436 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.21]\nname=HDP-UTILS-1.1.0.21\nbaseurl=http://s3.amazonaws.com/dev.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos6\n\npath=/\nenabled=1\ngpgcheck=0'}
2017-07-19 17:09:34,437 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-07-19 17:09:34,511 - Skipping installation of existing package unzip
2017-07-19 17:09:34,511 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-07-19 17:09:34,519 - Skipping installation of existing package curl
2017-07-19 17:09:34,519 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-07-19 17:09:34,526 - Skipping installation of existing package hdp-select
2017-07-19 17:09:34,708 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-07-19 17:09:34,712 - checked_call['hostid'] {}
2017-07-19 17:09:34,729 - checked_call returned (0, 'a8c02132')
2017-07-19 17:09:34,733 - Package['ambari-metrics-collector'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2017-07-19 17:09:34,809 - Installing package ambari-metrics-collector ('/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-collector')
2017-07-19 17:09:37,830 - Execution of '/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-collector' returned 1. Error: Nothing to do
2017-07-19 17:09:37,830 - Failed to install package ambari-metrics-collector. Executing '/usr/bin/yum clean metadata'
2017-07-19 17:09:38,131 - Retrying to install package ambari-metrics-collector after 30 seconds

Command failed after 1 tries

回答1:


resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-collector' returned 1. 
Error: Nothing to do

Usually, this error means that some package is not available in repo, already installed and so on. Try running command manually in verbose mode like

/usr/bin/yum -y install ambari-metrics-collector

and post entire yum output.




回答2:


Taking the analysis part of Dmitriusan's answer and adding that the suggestion to run the yum manually may not work as the issue is about the package not being available in the repo. You may have to either add a repo that contains package in /etc/yum.repos.d/ and then retry or run the command in Dmitriusan's answer. Or manually download the rpm and install it as "rpm -i /path/to/package.rpm"



来源:https://stackoverflow.com/questions/45205352/apache-metrics-collector-install-failed-while-deploying-apache-ambari-2-5-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!