Restart elasticsearch node

user1768906 picture user1768906 · Jan 2, 2013 · Viewed 82.8k times · Source

What is the proper way to restart node in elasticsearch? (preferably via the REST API, java API might be ok too)

Answer

DrTech picture DrTech · Mar 11, 2013

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.

If you are using the service wrapper, you can restart a node by passing it the restart command: eg /etc/init.d/elasticsearch restart but that is just a convenience wrapper for the above.

The restart API has been disabled since version 0.11 as it was problematic.