如何使用带环回 IP 地址的主机名配置 Ambari 服务器和 HDP 应用程序?

How to configure Ambari server and HDP applications using hostname with loopback IP address?

我在 Ubuntu 12.04 上有一个 运行 Ambari 服务器和 HDP 应用程序,主机名解析为 Public IP 地址。 我的任务是用环回地址替换 public IP 地址。为此,我做了以下更改:

1) 将 /etc/hosts 文件更新为:
127.0.0.1 本地主机
127.0.0.1 mynode.com 我的节点
#10.xx.xx.xx mynode.com mynode

2) 将以下参数的值设置为“0.0.0.0”使其成为 多宿主 dfs.namenode.rpc-绑定主机, dfs.namenode.servicerpc-绑定主机,dfs.namenode.http-绑定主机, dfs.namenode.https-绑定主机,yarn.resourcemanager.bind-主机, yarn.nodemanager.bind-主机,yarn.timeline-service.bind-主机, mapreduce.jobhistory.bind-主机

这些更改后,当我重新启动系统时,HDP 应用程序没有出现。

当我还原在 /etc/hosts 文件中所做的更改以分配 public IP 时,它再次开始正常工作。

我可以知道我还缺少什么吗?

我在 ambari-server.log 文件中看到以下错误:

ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert namenode_webui for an invalid service HDFS and component NAMENODE on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert upgrade_finalized_state for an invalid service HDFS and component NAMENODE on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert kafka_broker_process for an invalid service KAFKA and component KAFKA_BROKER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert storm_supervisor_process for an invalid service STORM and component SUPERVISOR on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert storm_server_process for an invalid service STORM and component STORM_UI_SERVER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert hive_metastore_process for an invalid service HIVE and component HIVE_METASTORE on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert mapreduce_history_server_process for an invalid service MAPREDUCE2 and component HISTORYSERVER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert ams_metrics_collector_process for an invalid service AMBARI_METRICS and component METRICS_COLLECTOR on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert yarn_resourcemanager_webui for an invalid service YARN and component RESOURCEMANAGER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert hive_server_process for an invalid service HIVE and component HIVE_SERVER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert storm_drpc_server for an invalid service STORM and component DRPC_SERVER on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert ams_metrics_collector_autostart for an invalid service AMBARI_METRICS and component METRICS_COLLECTOR on host localhost ERROR [alert-event-bus-2] AlertReceivedListener:365 - Unable to process alert secondary_namenode_process for an invalid service HDFS and component SECONDARY_NAMENODE on host localhost

如能帮助解决此问题,我们将不胜感激。

谢谢。

将这些作为单独的行似乎是问题所在。

127.0.0.1 localhost
127.0.0.1 mynode.com mynode

您可以删除第二行(因为它覆盖了第一行),但建议将它们设为一行

127.0.0.1 localhost mynode.com mynode