创建 Apache Ambari 集群时无法注册主机

Unable to register host while creating Apache Ambari cluster

我正在尝试在 CentOS7 上创建本地主机 Apache Ambari 集群。我正在使用使用以下命令从 Ambari 存储库下载和安装的 Ambari 2.2.2 二进制文件

cd /etc/yum.repos.d/
wget  http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.2.2.0/ambari.repo
yum install ambari-server
ambari-server setup
ambari-server start

在启动服务器之前,我已经完成了 Hortonworks 中描述的所有必要准备步骤,包括无密码 ssh 的设置,根据互联网上的帖子,这是经常出现问题的原因。我用

验证
ssh root@localhost

在 "Install options" window 中创建集群的过程中,我输入了我要创建的主机的名称(在我的例子中是 localhost),并且已经尝试了两个选项,它们是

对于第二个选项,我已经下载并安装了 ambari-agent

yum install ambari-agent
ambari-agent start

在手动注册主机的情况下,我收到以下错误

"Host checks were skipped on 1 hosts that failed to register.".

当我点击 "Failed" 时,在某些情况下,互联网上的描述应该会提供更准确的问题描述,我看到以下内容 “正在向服务器注册... 向服务器注册失败。"

因此,我现在甚至不知道从哪里开始搜索这个错误的可能原因。

Ambari 集群节点需要配置完全限定域名 (FQDN)。 localhost 不是 FQDN。您将需要使用 FQDN 配置节点,然后重试安装。您可以使用类似于:localhost.local 的 FQDN。此要求以及如何配置节点以满足它已记录在先决条件中。来自 HDP documentation:

All hosts in your system must be configured for both forward and and reverse DNS.

If you are unable to configure DNS in this way, you should edit the /etc/hosts file on every host in your cluster to contain the IP address and Fully Qualified Domain Name of each of your hosts.

我最近遇到了同样的 “正在向服务器注册...向服务器注册失败。” 问题。 我发现关于同一主题的回复建议查看位于此处 /var/log/ambari-agent/ambari-agent.log 的日志文件,从那里能够检查主机名在安装的其他阶段是否设置不正确(我有一些东西像 ambari.hadoop 而不是本地主机)。所以我去了 /etc/ambari-agent/conf/ambari-agent.ini 并在那里修复了它。 我知道我在挖掘一些很老的问题,但似乎在一个地方编译所有这些可能会帮助遇到同样问题的人。