Ping 本地主机不起作用

Pinging local host doesn't function

elasticsearch==7.10.0

我想 ping 本地主机 '5601' 以确保 kibana 是否 运行 但显然无法 ping。

注意:我知道 elastic search 具有内置的 ping 功能,但我仍然希望在我的项目中出于特定原因使用 cmd 行进行 ping。

C:\User>ping 5601

Pinging f00:b00:f00:b00 with 32 bytes of data:
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.
PING: transmit failed. General failure.

Ping statistics for f00:b00:f00:b00:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)

C:\User>ping http://localhost:5601
Ping request could not find host http://localhost:5601. Please check the name and try again.

有人可以帮我吗?

可以使用netstat查看Kibana暴露的端口UI,5061是否处于LISTEN模式

$ netstat -tlpn | grep 5601
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::5601                 :::*                    LISTEN      -  

或者如果你想建立到目标端口 5601 的连接,你可以使用 nc

$ nc -vz localhost 5601
Connection to localhost 5601 port [tcp/*] succeeded!