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

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/
主站蜘蛛池模板: 临泽县| 阳新县| 道孚县| 东方市| 特克斯县| 建始县| 温泉县| 资中县| 宝清县| 普宁市| 兰州市| 环江| 涿州市| 正定县| 府谷县| 霍山县| 闵行区| 内丘县| 民县| 霍林郭勒市| 长沙市| 平舆县| 南昌市| 大宁县| 孝感市| 噶尔县| 阳泉市| 龙南县| 光山县| 石林| 湄潭县| 七台河市| 台州市| 广州市| 青海省| 成武县| 屏山县| 凌云县| 星子县| 沿河| 扎囊县|