官术网_书友最值得收藏!

  • ElasticSearch Server
  • Rafa? Ku? Marek Rogoziński
  • 169字
  • 2021-07-30 17:29:15

Shutting down ElasticSearch

Even though we expect our cluster (or node) to run flawlessly for a lifetime, we may end up needing to restart it or shut it down properly (for example, for maintenance). There are three ways in which we can shut down ElasticSearch:

  • If your node is attached to the console (run with the –f option), just press Ctrl + C
  • The second option is to kill the server process by sending the TERM signal (see the kill command on the Linux boxes and program manager on Windows)
  • The third method is to use a REST API

We will focus on the last method now. It allows us to shut down the whole cluster by executing the following command:

curl -XPOST http://localhost:9200/_cluster/nodes/_shutdown

To shut down just a single node, execute the following command:

curl –XPOST http://localhost:9200/_cluster/nodes/BlrmMvBdSKiCeYGsiHijdg/_shutdown

In the previous command line, BlrmMvBdSKiCeYGsiHijdg is the identifier for a given node. The former may be read from ElasticSearch logs or from another API call:

curl -XGET http://localhost:9200/_cluster/nodes/
主站蜘蛛池模板: 桑植县| 中方县| 黎川县| 石渠县| 南雄市| 新密市| 仙游县| 洛浦县| 武陟县| 宣城市| 呼和浩特市| 闽清县| 武定县| 星子县| 元朗区| 封丘县| 秦皇岛市| 田东县| 武义县| 化州市| 横山县| 南京市| 民权县| 普定县| 镇安县| 宿迁市| 永州市| 叙永县| 鄯善县| 望都县| 芜湖市| 临沭县| 磴口县| 化德县| 裕民县| 文化| 乌拉特中旗| 兴安盟| 哈巴河县| 八宿县| 蓬溪县|