Michael Davie created AMBARI-21702: -------------------------------------- Summary: 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
* 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 at the address 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 fails, as the HTML page exceeds the size (255 characters) of the hostname field. A functioning 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)