Home:ALL Converter>Ambari: How do I deploy /etc/hosts?

Ambari: How do I deploy /etc/hosts?

Ask Time:2019-11-28T17:34:58         Author:Hades Su

Json Formatter

I installed Ambari, but it reported an error at startup with the following error:

  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

I suspect /etc/hosts is misconfigured, /etc/hosts reads as follows:

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

How should I do? Is it a problem with /etc/hosts?

Author:Hades Su,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59085631/ambari-how-do-i-deploy-etc-hosts
ketankk :

You can debug this with the following steps:\n1. telnet from the ambari-server machine, \n\ntelnet hadoop-cluster-centos7-master.bluemix.net 50070\n\nIf this is not connecting, you need to open this port on",
2019-11-28T11:10:20
yy