How to make elasticsearch
apply new configuration?
I changed one string in file ~ES_HOME/config/elasticsearch.yml
:
# Disable HTTP completely:
#
http.enabled: false
Then tried to reload elasticsearch
:
elasticsearch reload
Then tried to restart elasticsearch
:
elasticsearch restart
Then checked and see that http requests are still acceptable to elastic search.
So my settings are not applied.
My os is os X
. ElasticSearch version is 1.2.0
The correct way to restart a node is to shut it down, using either the shutdown API or sending a TERM signal to the process (eg with kill $PID ). Once shut down, you can start a new node using whatever you use to run elasticsearch, eg the service wrapper, or just starting it from the command line.
You can find elasticsearch. yml in /usr/share/elasticsearch/config/elasticsearch. yml (Docker) or /etc/elasticsearch/elasticsearch.
Strangely or not so, the supposed way to do it is just to stop the service, and start it again :)
I.E. get its pid (running ps axww | grep elastic), and then kill ESpid ; just be sure to use the TERM signal, to give it a chance to close properly.
Some *nix elasticsearch distros have control scripts wrappers for start/stop , but I don't think OS X does.
And on a side note, you have probably found the Cluster Update Settings API, and though it provides quite a few options, regretfully it can't be used to change that particular setting.
HTH
P.S. And yep, in Windows setup the services.msc is the way to do it, but doubt this is helpful for you :)
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