1) 使用
lsoflinux中的命令 检查端口9200的状态 。
就我而言,以下
elasticsearch是启动时的结果。
prayag@prayag:~$ sudo lsof -i TCP | grep 9200 chrome 2639 praayg 84u IPv4 116310 0t0 TCP prayag.local:58989->10.0.4.70:9200 (ESTABLISHED)chrome 2639 prayag 99u IPv4 116313 0t0 TCP prayag.local:58990->10.0.4.70:9200 (ESTABLISHED)java 7634 prayag 141u IPv6 130960 0t0 TCP *:9200 (LISTEN)
elasticsearch对我不是服务,否则找到正在运行的 端口 ;我本来可以检查的
$ sudo lsof -iTCP -sTCP:LISTEN | grep elasticsearch
2)检查elasticsearch端点
$ curl -IGET http://localhost:9200HTTP/1.1 200 OKcontent-type: application/json; charset=UTF-8content-length: 327
-IGET
等效于--head
仅返回http响应标头。响应
200
表示Elasticsearch端点正常响应。



