[
https://issues.apache.org/jira/browse/AMBARI-21702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Davie updated AMBARI-21702:
-----------------------------------
Description:
* The script {{hostname.py}}
(https://github.com/apache/ambari/blob/79cca1c7184f1661236971dac70d85a83fab6c11/ambari-agent/src/main/python/ambari_agent/hostname.py)
attempts to retrieve a host's public hostname from AWS from the location
http://169.254.169.254/latest/meta-data/public-hostname.
* In a non-AWS network with a network proxy present, this request can return an
HTML login or redirect page, rather than the expected hostname value.
* The script does not validate the length or format of the returned value, and
submits the returned HTML code to ambari-server as the public hostname.
* Registration of the host fails, as the submitted HTML code exceeds the size
of the hostname field in the server's database (255 characters).
* A partial manual workaround has been published at
https://community.hortonworks.com/articles/42872/why-ambari-host-might-have-different-public-host-n.html.
was:
* The script {{hostname.py}}
(https://github.com/apache/ambari/blob/79cca1c7184f1661236971dac70d85a83fab6c11/ambari-agent/src/main/python/ambari_agent/hostname.py)
attempts to retrieve a host's public hostname from AWS from the location
http://169.254.169.254/latest/meta-data/public-hostname.
* In a non-AWS network with a network proxy present, this request can return an
HTML login or redirect page, rather than the expected hostname value.
* The script does not validate the length or format of the returned value, and
submits the returned HTML code to ambari-server as the public hostname.
* Registration of the host fails, as the submitted HTML code exceeds the size
of the hostname field in the server's database (255 characters).
* A functioning manual workaround has been published at
https://community.hortonworks.com/articles/42872/why-ambari-host-might-have-different-public-host-n.html.
* An alternative workaround is to set the default gateway of the nodes to the
IP address of the Ambari server.
> ambari-agent registration fails due to invalid public hostname
> --------------------------------------------------------------
>
> Key: AMBARI-21702
> URL: https://issues.apache.org/jira/browse/AMBARI-21702
> Project: Ambari
> Issue Type: Bug
> Components: ambari-agent
> Affects Versions: 2.6.0
> Environment: Networks with an active web proxy
> Reporter: Michael Davie
> Priority: Critical
>
> * The script {{hostname.py}}
> (https://github.com/apache/ambari/blob/79cca1c7184f1661236971dac70d85a83fab6c11/ambari-agent/src/main/python/ambari_agent/hostname.py)
> attempts to retrieve a host's public hostname from AWS from the location
> http://169.254.169.254/latest/meta-data/public-hostname.
> * In a non-AWS network with a network proxy present, this request can return
> an HTML login or redirect page, rather than the expected hostname value.
> * The script does not validate the length or format of the returned value,
> and submits the returned HTML code to ambari-server as the public hostname.
> * Registration of the host fails, as the submitted HTML code exceeds the size
> of the hostname field in the server's database (255 characters).
> * A partial manual workaround has been published at
> https://community.hortonworks.com/articles/42872/why-ambari-host-might-have-different-public-host-n.html.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)