- 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/
推薦閱讀
- 光網絡評估及案例分析
- Django 2 by Example
- Hands-On Chatbots and Conversational UI Development
- 信息通信網絡建設安全管理概要2
- 通信簡史:從信鴿到6G+
- Socket.IO Real-time Web Application Development
- Building RESTful Web services with Go
- 物聯網之霧:基于霧計算的智能硬件快速反應與安全控制
- WordPress Web Application Development
- IPv6網絡切片:使能千行百業新體驗
- 通信十年:擁抱互聯網
- 物聯網工程概論
- 一本書讀懂物聯網
- 園區網絡架構與技術
- TCP/IP基礎(第2版)