if i leave the network.host commented out in /etc/elasticsearch/elasticsearch.yml, it will start like normal (curl localhost:9200 returns result as expected).
However, if I set network.host = <public-ip> then sudo service elasticsearch restart it will says OK but then the status of elasticsearch is not running.
what did I do wrong in this case?
System: Ubuntu 14.04 LTS
Update: Fixed by binding it to 0.0.0.0.
Update: Fixed by binding it to 0.0.0.0.
The proper way to fix this is to pass the bootstrap tests in elasticsearch:
add to /etc/security/limits.conf something like:
# elasticsearch
* hard nofile 65536
* hard nproc 2048
Be careful with the network configuration!
Never expose an unprotected node to the public internet. (elasticsearch docs)
A secure solution would be to bind to a loopback interface & create an ssh tunnel from the host that needs access => elasticsearch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With