在使用ambari进行安装部署过程中遇到的glibc问题

在使用ambari进行安装部署过程中遇到的glibc问题

使用 yum check rpm -e rpm -q 处理问题

报错信息如下:

stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_monitor.py", line 68, in <module>
    AmsMonitor().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_monitor.py", line 30, in install
    self.install_packages(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 708, in install_packages
    retry_count=agent_stack_retry_count)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 166, 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 53, 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-monitor' returned 1. There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

         1. You have an upgrade for glibc which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of glibc of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude glibc.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of glibc installed, but
            yum can only see an upgrade for one of those architectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

         3. You have duplicate versions of glibc installed already.
            You can use "yum check" to get yum show these errors.

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

       Protected multilib versions: glibc-2.17-196.el7.i686 != glibc-2.17-196.el7_4.2.x86_64
 stdout:
User Group mapping (user_group) is missing in the hostLevelParams
2018-01-09 11:14:44,718 - Group['hadoop'] {}
2018-01-09 11:14:44,719 - User['zookeeper'] {'gid': 'hadoop', 'groups': [u'hadoop']}
2018-01-09 11:14:44,720 - User['ams'] {'gid': 'hadoop', 'groups': [u'hadoop']}
2018-01-09 11:14:44,720 - User['ambari-qa'] {'gid': 'hadoop', 'groups': [u'hadoop']}
2018-01-09 11:14:44,733 - Initializing 3 repositories
2018-01-09 11:14:44,734 - Repository['hashdata-1.4.0'] {'base_url': 'https://hashdata-repository.pek3a.qingstor.com/hashdata/centos7/master/repo/', 'action': ['create'], 'components': [u'hashdata-repo', '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': 'hashdata-repo', 'mirror_list': None}
2018-01-09 11:14:44,740 - File['/etc/yum.repos.d/hashdata-repo.repo'] {'content': '[hashdata-1.4.0]\nname=hashdata-1.4.0\nbaseurl=https://hashdata-repository.pek3a.qingstor.com/hashdata/centos7/master/repo/\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-01-09 11:14:44,741 - Repository['HDP-2.6'] {'base_url': 'http://hashdata-hdp-artifacts-mirror.pek3a.qingstor.com/HDP/centos7/2.x/updates/2.6.2.0', 'action': ['create'], 'components': [u'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}
2018-01-09 11:14:44,744 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.6]\nname=HDP-2.6\nbaseurl=http://hashdata-hdp-artifacts-mirror.pek3a.qingstor.com/HDP/centos7/2.x/updates/2.6.2.0\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-01-09 11:14:44,744 - Repository['HDP-UTILS-1.1.0.21'] {'base_url': 'http://hashdata-hdp-artifacts-mirror.pek3a.qingstor.com/HDP-UTILS-1.1.0.21/repos/centos7', 'action': ['create'], 'components': [u'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}
2018-01-09 11:14:44,747 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.21]\nname=HDP-UTILS-1.1.0.21\nbaseurl=http://hashdata-hdp-artifacts-mirror.pek3a.qingstor.com/HDP-UTILS-1.1.0.21/repos/centos7\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-01-09 11:14:44,884 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2018-01-09 11:14:44,886 - checked_call['hostid'] {}
2018-01-09 11:14:44,890 - checked_call returned (0, 'a8c00400')
2018-01-09 11:14:44,893 - Package['ambari-metrics-monitor'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-01-09 11:14:44,949 - Installing package ambari-metrics-monitor ('/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-monitor')
2018-01-09 11:14:48,855 - Execution of '/usr/bin/yum -d 0 -e 0 -y install ambari-metrics-monitor' returned 1. There are unfinished transactions remaining. You might consider running yum-complete-transaction, or "yum-complete-transaction --cleanup-only" and "yum history redo last", first to finish them. If those don't work you'll have to try removing/installing packages by hand (maybe package-cleanup can help).
The program yum-complete-transaction is found in the yum-utils package.
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

         1. You have an upgrade for glibc which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of glibc of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude glibc.otherarch ... this should give you an error
            message showing the root cause of the problem.

         2. You have multiple architectures of glibc installed, but
            yum can only see an upgrade for one of those architectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

         3. You have duplicate versions of glibc installed already.
            You can use "yum check" to get yum show these errors.

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

       Protected multilib versions: glibc-2.17-196.el7.i686 != glibc-2.17-196.el7_4.2.x86_64
2018-01-09 11:14:48,855 - Failed to install package ambari-metrics-monitor. Executing '/usr/bin/yum clean metadata'
2018-01-09 11:14:49,055 - Retrying to install package ambari-metrics-monitor after 30 seconds

解决方案

  • 使用 yum check 检查包依赖关系

    [root@hashdata-segment1 ~]# yum check
    Loaded plugins: fastestmirror
    Repository hashdata-1.4.0 is listed more than once in the configuration
    glibc-common-2.17-196.el7_4.2.x86_64 is a duplicate with glibc-common-2.17-196.el7.x86_64
    glibc-common-2.17-196.el7_4.2.x86_64 has missing requires of glibc = ('0', '2.17', '196.el7_4.2')
    1:grub2-2.02-0.64.el7.centos.x86_64 is obsoleted by 1:grub2-2.02-0.64.el7.centos.x86_64
    libgcc-4.8.5-16.el7_4.1.x86_64 is a duplicate with libgcc-4.8.5-16.el7.x86_64
    Error: check all
  • 使用 rpm -q 查看包,使用 rpm -e 卸载多余包。

    [root@hashdata-segment1 ~]# rpm -q glibc-common-2.17-196.el7_4.2.x86_64
    glibc-common-2.17-196.el7_4.2.x86_64
    [root@hashdata-segment1 ~]# rpm -e glibc-common-2.17-196.el7_4.2.x86_64
    [root@hashdata-segment1 ~]# rpm -q glibc-common-2.17-196.el7_4.2.x86_64
    package glibc-common-2.17-196.el7_4.2.x86_64 is not installed
    [root@hashdata-segment1 ~]# rpm -q libgcc-4.8.5-16.el7_4.1.x86_64
    libgcc-4.8.5-16.el7_4.1.x86_64
    [root@hashdata-segment1 ~]# rpm -e libgcc-4.8.5-16.el7_4.1.x86_64
    [root@hashdata-segment1 ~]# rpm -q libgcc-4.8.5-16.el7_4.1.x86_64
    package libgcc-4.8.5-16.el7_4.1.x86_64 is not installed

猜你喜欢

转载自blog.csdn.net/zhang50303/article/details/79012604