ambari:如何部署/etc/hosts?

jrcvhitl  于 2021-05-27  发布在  Hadoop
关注(0)|答案(2)|浏览(588)

我安装了ambari,但它在启动时报告了一个错误,错误如下:

File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/YARN/package/scripts/yarn.py", line 93, in yarn
    setup_ats()
  File "/var/lib/ambari-agent/cache/stacks/HDP/3.0/services/YARN/package/scripts/yarn.py", line 537, in setup_ats
    mode=0755
  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/libraries/providers/hdfs_resource.py", line 677, in action_create_on_execute
    self.action_delayed("create")
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 674, in action_delayed
    self.get_hdfs_resource_executor().action_delayed(action_name, self)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 373, in action_delayed
    self.action_delayed_for_nameservice(None, action_name, main_resource)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 395, in action_delayed_for_nameservice
    self._assert_valid()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 334, in _assert_valid
    self.target_status = self._get_file_status(target)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 497, in _get_file_status
    list_status = self.util.run_command(target, 'GETFILESTATUS', method='GET', ignore_status_codes=['404'], assertable_result=False)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 214, in run_command
    return self._run_command(*args,**kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 282, in _run_command
    _, out, err = get_user_call_output(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/get_user_call_output.py", line 62, in get_user_call_output
    raise ExecutionFailed(err_msg, code, files_output[0], files_output[1])
resource_management.core.exceptions.ExecutionFailed: Execution of 'curl -sS -L -w '%{http_code}' -X GET -d '' -H 'Content-Length: 0' 'http://hadoop-cluster-centos7-master.bluemix.net:50070/webhdfs/v1/ats/done?op=GETFILESTATUS&user.name=hdfs' 1>/tmp/tmpHJSnha 2>/tmp/tmpSB43Hj' returned 7. curl: (7) Failed connect to hadoop-cluster-centos7-master.bluemix.net:50070; Connection refused
000

我怀疑/etc/hosts配置错误,/etc/hosts的内容如下:

127.0.0.1 hadoop-cluster-centos7-master.bluemix.net hadoop-cluster-centos7-master
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4

# The following lines are desirable for IPv6 capable hosts

::1 hadoop-cluster-centos7-master.bluemix.net hadoop-cluster-centos7-master
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

10.244.128.32 hadoop-cluster-centos7-master.bluemix.net
10.244.128.69 hadoop-cluster-centos7-slave1.bluemix.net

我该怎么办?/etc/hosts有问题吗?

piztneat

piztneat1#

对不起,这是我犯的低级错误造成的。我错误配置了/etc/hosts,我已经解决了,下面是我的/etc/hosts正确内容:

10.244.128.83 cluster8-master.bluemix.net cluster8-master
10.244.128.38 cluster8-slave1.bluemix.net cluster8-slave1
10.244.128.23 cluster8-slave2.bluemix.net cluster8-slave2

127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
wwtsj6pe

wwtsj6pe2#

您可以通过以下步骤对此进行调试:1。来自ambari服务器的telnet, telnet hadoop-cluster-centos7-master.bluemix.net 50070 如果没有连接,您需要在上打开此端口

相关问题