I want to restart an elasticsearch node with a new configuration. What is the best way to gracefully shut down an node?
Is killing the process the best way of shutting t
Updated answer.
_shutdown
API has been removed in elasticsearch 2.x.
Some options:
In your terminal (dev mode basically), just type "Ctrl-C"
If you started it as a daemon (-d
) find the PID and kill the process: SIGTERM
will shut Elasticsearch down cleanly (kill -15 PID
)
If running as a service, run something like service elasticsearch stop
:
Previous answer. It's now deprecated from 1.6.
Yeah. See admin cluster nodes shutdown documentation
Basically:
# Shutdown local node
$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
# Shutdown all nodes in the cluster
$ curl -XPOST 'http://localhost:9200/_shutdown'