I just have one node where I am running ES and Kibana. In addition to the localhost, I would like to access ES from another host (remote_ip1) as well. But, I would like to avoid setting the network.host to 0.0.0.0. When I put just the 2 hosts I would like to access ES from, it is not starting.
[2020-08-03T01:56:42,689][ERROR][o.e.b.Bootstrap ] [localhost] Exception
org.elasticsearch.transport.BindTransportException: Failed to bind to remote_ip1:[9300-9400]
What config changes do I need to make to the elasticsearch.yml to get this working?
That is the 'listening' IP, either localhost or the machines IP or 0.0.0.0 (which is similar) - this is basic TCP/IP config, so for ANY other host to reach this one, set it to either the machine's IP or 0.0.0.0 - the effect is the same.
This is NOT the IP of the client, or other machine, etc. but of what IP the Elasticsearch node listens on - in the TCP world, this is an interface, either localhost/127.0.0.1, an interface IP, or 0.0.0.0 which is all interfaces (which in practice this is usually both localhost and the machine's IP).
So set to 0.0.0.0 and you're done; if you want to limit access to the one other host, use cloud security groups or iptables.
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.