The pinging of localhost is a diversion, I think. That's the default behaviour if discovery.zen.ping.unicast.hosts is unset. You can suppress it by setting it to the empty list instead:
discovery.zen.ping.unicast.hosts: []
The real issue lies between these two lines:
[2018-12-11T00:57:41,477][TRACE][o.e.d.e.AwsEc2UnicastHostsProvider] [ip-172-25-34-206] building dynamic unicast discovery nodes...
[2018-12-11T00:57:41,478][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [ip-172-25-34-206] using dynamic transport addresses []
The first line is reported here:
After that Elasticsearch loops through all the instances returned by the DescribeInstances call and logs various things at various points, before finally logging using dynamic transport addresses .... That there is nothing logged between these two lines suggests that nothing is returned by EC2.
Can you construct an analogous DescribeInstances call and verify that the right instances are genuinely returned? The relevant code is here:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.