I have just setup a new dev 7.6.2 single-node cluster via rpm on centos 7 and am unable to curl the API on the non-loopback address. Curl to localhost works fine and I can also telnet to the default port of 9200 of the non-loopback address from another host. I have tried many different variations for network host including special site, ip addr, 0.0.0.0, and 0. This is a POC so I am not trying to configure very much beyond defaults. I have no issues with the service starting in regards to the bootstrap checks for single node cluster. Any help would be much appreciated.
Relevant elasticsearch.yml network/http settings I have explicitly set in file:
network.host: 0
http.port: 9200
Thank you for your reply, but unfortunately this did not fix the communication issue. Additionally I have no issue with the service starting as a single node cluster and electing itself as master.
I receive no error as far as the service goes. The issue is I am unable to communicate/receive a response from the api on the non-loopback address via curl on port 9200, despite the server being bound to said port and also being able to successfully telnet to 9200 from a different host as well.
I just tried your suggestion, and still am unable to get a response via curl.
From log file: publish_address {10.240.10.221:9200}, bound_addresses {10.240.10.221:9200}
I also tried not using 0, and using [local, "10.240.10.221"]
From log file: publish_address {10.240.10.221:9200}, bound_addresses {127.0.0.1:9200}, {10.240.10.221:9200}
Same result, works with loopback but not with ip addr and I can successfully telnet from another host on 10.240.10.221:9200. so it doesn't seem to be comm/firewall issue. Very confused!
hitting localhost: curl localhost:9200 - This works
trying from ES host itself and another host(can telnet over 9200 from this host): curl 10.240.10.221:9200 - doesn't work
Both of these hosts have firewalld disabled for testing. They are two EC2 instances in the same security group with these ports open and I have successfully been able to telnet over port 9200 to the elasticsearch host from the other host. I have not configured the EC2 discovery plugin, although I may be incorrect seeing it as optional. Am I missing something that would be specific to it being cloud servers?
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.