Ambari 更新失败(Ambari 2.4 到 2.6)- Hadoop 服务将不再启动

Ambari-Update failed (Ambari 2.4 to 2.6) - Hadoop services won't start anymore

我刚刚完成了 Hortonworks 数据平台的升级指南: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.0.0/bk_ambari-upgrade/bk_ambari-upgrade.pdf

我完成了第 1 - 4 节(Ambari 升级)中描述的所有步骤。但现在我遇到了问题,我的服务将不再启动!

Ambari 可以找到所有主机,但它们无法启动!

例如对于 HDFS 启动,我收到以下错误消息:

2017-11-13 19:41:11,427 - Unable to load available packages
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 771, in load_available_packages
    self.available_packages_in_repos = pkg_provider.get_available_packages_in_repos(repos)
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 85, in get_available_packages_in_repos
    available_packages.extend(self._get_available_packages(repo))
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 146, in _get_available_packages
    return self._lookup_packages(cmd, 'Available Packages')
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 191, in _lookup_packages
    if items[i + 2].find('@') == 0:
IndexError: list index out of range
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 73, in <module>
    HdfsClient().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 367, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 930, in restart
    self.install(env)
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 35, in install
    import params
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/params.py", line 25, in <module>
    from params_linux import *
  File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py", line 391, in <module>
    lzo_packages = get_lzo_packages(stack_version_unformatted)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/get_lzo_packages.py", line 45, in get_lzo_packages
    lzo_packages += [script_instance.format_package_name("hadooplzo_${stack_version}"),
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 538, in format_package_name
    raise Fail("Cannot match package for regexp name {0}. Available packages: {1}".format(name, self.available_packages_in_repos))
resource_management.core.exceptions.Fail: Cannot match package for regexp name hadooplzo_${stack_version}. Available packages: []

(我认为最重要的部分是消息 resource_management.core.exceptions.Fail: Cannot match package for regexp name hadooplzo_${stack_version}. Available packages: [],看起来没有可用的版本(包)...!

我刚刚看到,我还升级了 Ambari Metrics MonitorAmbari Metrics Hadoop SinkMetrics Collector 在启动服务前一次(手册在这里有点混乱,见步骤 4.3.3)!这是一个错误吗?

我尝试从 Ambari 2.4 升级到 Ambari 2.6(安装了 HDP 2.5)!操作系统为CentOS 7.

但是,我需要重置/降级 Ambari 或升级服务才能再次启动它们!有人可以帮忙吗?任何帮助,将不胜感激!谢谢!

最后,我能够将我的 Ambari 安装降级回版本 2.4.2,就像开始升级过程之前一样。

要进行降级,您必须在适当的节点上执行以下步骤:

# delete the new ambari repo file
rm /etc/yum.repos.d/ambari.repo

# download the old ambari repo file (for me version 2.4.2), as described in ambari installation guide (here for Centos 7)
wget -nv http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.4.2.0/ambari.repo -O /etc/yum.repos.d/ambari.repo

yum clean all
yum repolist
# check for the correct version (e.g. 2.4.2) of the Ambari repo

# Downgrade all components to this version
yum downgrade ambari-metrics-monitor
yum downgrade ambari-metrics-hadoop-sink
yum downgrade ambari-agent
...

后来我又升级了,升级到Ambari 2.5.2.0版本,现在可以正常使用了。我还能够通过此 Ambari 版本将我的 HDP 安装升级到版本 2.6.3.0。

我将跳过 Ambari 2.6.0,并尝试在以后的版本中升级 Ambari。