I wish to make the Elasticsearch running on my localhost open to public access (within my college). Therefore I wish to bind it to an IP address of my choice. However, I followed the instructions on this link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html and changed the 'network.host' parameter in the config file. It has still not gone public.
Did you restart Elasticsearch after you changed it? Elasticsearch logs which port it is binding to on startup. Once for its internal "transport" protocol and once for REST.
Magnus - It is an internal college IP. I am, however, unable to access it even after changing the config which means the hosting failed for some reason.
Nik - Yes, I did restart it. And yet, there is no difference.
Please note that I've managed to successfully host Kibana on the same IP on port 5601 by altering its configuration. Cannot fathom why it isn't happening for Elasticsearch.
Have you validated it's running and listening? (netstat -tnlp, look for java on 9300)
Could a firewall be impeding the connection? Try running netcat (or an echo server) as a listener on tcp/9300 and see if you can connect to it instead.
If you can, you may want to re-run the netstat as root just to confirm that it's ES running on 9200.
That said, it looks like something is listening on :9200, but only on localhost. This may be an indication that the bind_host and/or network_host is only set to localhost/127.0.0.1. For it to listen on your outward facing interface it will either show 0.0.0.0:9200 or :::9200 and/or your $BIND_HOST:9200.
Problem resolved. Now hosting successfully. Turns out it was a very silly error - I had to remove the # at the beginning of the operative lines in the config file where I'd mentioned the IP addresses and the port numbers.
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.