我想使用新配置重新启动elasticsearch节点。正常关闭节点的最佳方法是什么?
关闭进程是关闭服务器的最佳方法,还是我可以使用一些神奇的URL关闭节点?
最佳答案
更新了答案。 _shutdown
API已在Elasticsearch 2.x中删除。
一些选项:
-d
)启动,请找到PID并终止进程:SIGTERM
将彻底关闭Elasticsearch(kill -15 PID
)service elasticsearch stop
的内容:上一个答案。现在从1.6开始不推荐使用。
是的参见admin cluster nodes shutdown documentation
基本上:
# Shutdown local node
$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
# Shutdown all nodes in the cluster
$ curl -XPOST 'http://localhost:9200/_shutdown'