You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ambari 2.8.0安装Bigtop 3.2.0失败:bigtop-select缺失问题

问题解决:Ambari 2.8.0-rc1 + Bigtop 3.2.0 CentOS7安装失败(缺失bigtop-select包)

问题描述

使用Ambari 2.8.0-rc1配合Bigtop 3.2.0官方CentOS7源安装时,初始化阶段失败,核心原因是该公共源未提供bigtop-select包,导致Ambari agent执行前置安装钩子时无法完成yum -y install bigtop-select命令。

错误日志

2023-06-08 07:10:12,873 - 组件版本上报失败
Traceback (most recent call last):
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 370, in execute
self.save_component_version_to_structured_out(self.command_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 228, in save_component_version_to_structured_out
stack_select_package_name = stack_select.get_package_name()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 115, in get_package_name
package = get_packages(PACKAGE_SCOPE_STACK_SELECT, service_name, component_name)
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 232, in get_packages
supported_packages = get_supported_packages()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 153, in get_supported_packages
raise Fail("Unable to query for supported packages using {0}".format(stack_selector_path))
Fail: Unable to query for supported packages using /usr/lib/bigtop-select/distro-select
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/hook.py", line 37, in 
BeforeInstallHook().execute()
File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 355, in execute
method(env)
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/hook.py", line 33, in hook
install_packages()
File "/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/shared_initialization.py", line 37, in install_packages
retry_count=params.agent_stack_retry_count)
File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
self.env.run()
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/ambari-agent/lib/resource_management/core/providers/packaging.py", line 30, in action_install
self._pkg_manager.install_package(package_name, self.__create_context())
File "/usr/lib/ambari-agent/lib/ambari_commons/repo_manager/yum_manager.py", line 219, in install_package
shell.repository_manager_executor(cmd, self.properties, context)
File "/usr/lib/ambari-agent/lib/ambari_commons/shell.py", line 759, in repository_manager_executor
raise RuntimeError(message)
RuntimeError: Failed to execute command '/usr/bin/yum -y install bigtop-select', exited with code '1', message: 'Error: Nothing to do'

解决方案

方案1:手动安装bigtop-select包

从Bigtop官方构建资源中获取对应CentOS7版本的bigtop-select RPM包,手动安装:

  1. 下载适配CentOS7的bigtop-select RPM(可从Bigtop的构建归档中获取对应版本)
  2. 执行安装命令:
rpm -ivh bigtop-select-<version>.el7.x86_64.rpm

安装完成后重新触发Ambari安装流程。

方案2:切换到Bigtop 3.1.x版本源

Bigtop 3.1.x的CentOS7源包含bigtop-select包,修改系统的Bigtop源配置:

  1. 编辑Bigtop源配置文件(如/etc/yum.repos.d/bigtop.repo)
  2. 将baseurl替换为3.1.x版本的源:
[bigtop]
name=Bigtop Repository
baseurl=http://repos.bigtop.apache.org/releases/3.1.0/centos/7/x86_64
gpgcheck=1
gpgkey=http://repos.bigtop.apache.org/repos/GPG-KEY-bigtop
enabled=1
  1. 清理yum缓存并重新安装:
yum clean all
yum makecache

之后重新执行Ambari安装。

方案3:修改Ambari栈钩子配置(不推荐)

若无需stack-select功能,可修改Ambari的前置安装钩子脚本,跳过bigtop-select的安装:

  1. 编辑Ambari agent缓存中的钩子脚本:/var/lib/ambari-agent/cache/stack-hooks/before-INSTALL/scripts/shared_initialization.py
  2. 找到安装包的代码段,移除bigtop-select相关的安装逻辑
  3. 保存后重新触发安装流程

注意:此方案可能导致后续Ambari的版本切换、组件管理功能异常,仅在测试环境临时使用。

内容的提问来源于stack exchange,提问作者Meikel Rizky Hartawan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.19 22:44:57