Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reload elasticsearch after changing elasticsearch.yml

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

like image 596
Maxim Yefremov Avatar asked May 30 '14 06:05

Maxim Yefremov


People also ask

How do I restart Elasticsearch master node?

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.

Where is the Elasticsearch Yml file located?

You can find elasticsearch. yml in /usr/share/elasticsearch/config/elasticsearch. yml (Docker) or /etc/elasticsearch/elasticsearch.


1 Answers

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 :)

like image 70
Todor Minakov Avatar answered Oct 28 '22 01:10

Todor Minakov