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

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/
主站蜘蛛池模板: 遂川县| 文昌市| 阜新| 墨江| 福清市| 泾源县| 旌德县| 那曲县| 阿巴嘎旗| 会昌县| 仪陇县| 万载县| 丰县| 开化县| 老河口市| 镇沅| 嵊泗县| 康平县| 康平县| 大洼县| 本溪市| 长武县| 称多县| 营山县| 隆回县| 鹰潭市| 嵊州市| 岑巩县| 东莞市| 平阴县| 洛南县| 民权县| 普陀区| 西充县| 孝义市| 江津市| 探索| 武鸣县| 彩票| 三明市| 会东县|