如何停止/关闭弹性搜索节点? [英] How to stop/shut down an elasticsearch node?

查看:192
本文介绍了如何停止/关闭弹性搜索节点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想重新启动一个带有新配置的弹性搜索节点。正确关闭节点的最佳方法是什么?

I want to restart an elasticsearch node with a new configuration. What is the best way to gracefully shut down an node?

杀死该进程是关闭服务器的最佳方法,或者有一些魔术URL可用于关闭节点?

Is killing the process the best way of shutting the server down, or is there some magic URL I can use to shut the node down?

推荐答案

更新的答案。

_shutdown 已在弹性搜索2.x中删除API。

_shutdown API has been removed in elasticsearch 2.x.

某些选项:


  • 在你的终端(基本上是开发模式),只需输入Ctrl-C

  • In your terminal (dev mode basically), just type "Ctrl-C"

如果您将其作为守护程序( -d )启动,请查找PID并终止进程: SIGTERM 将关闭弹性搜索( kill -15 PID

If you started it as a daemon (-d) find the PID and kill the process: SIGTERM will shut Elasticsearch down cleanly (kill -15 PID)

如果作为一项服务运行,运行类似 service elasticsearch stop

If running as a service, run something like service elasticsearch stop:

  • Linux
  • Windows

以前的答案。现在已经从1.6开始。

是的。请参阅管理群集节点关闭文档

基本上:

# Shutdown local node
$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'

# Shutdown all nodes in the cluster
$ curl -XPOST 'http://localhost:9200/_shutdown'

这篇关于如何停止/关闭弹性搜索节点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆