如何停止/关闭Elasticsearch节点?

我想使用新配置重新启动elasticsearch节点。正常关闭节点的最佳方法是什么?

关闭进程是关闭服务器的最佳方法,还是我可以使用一些神奇的URL关闭节点?

回答:

_shutdown API已在elasticsearch 2.x中删除。

一些选项:

  • 在您的终端(基本上是开发模式)中,只需键入“ Ctrl-C”

  • 如果您以守护程序(-d)的身份启动它,请找到PID并SIGTERM终止该进程:将彻底关闭Elasticsearchkill -15 PID

  • 如果作为服务运行,请运行以下命令service elasticsearch stop

    • Linux
    • 视窗

是的

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

基本上:

# Shutdown local node

$ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'

# Shutdown all nodes in the cluster

$ curl -XPOST 'http://localhost:9200/_shutdown'

以上是 如何停止/关闭Elasticsearch节点? 的全部内容, 来源链接: utcz.com/qa/434816.html

回到顶部