初次启动Kibana遇到错误说5601端口已经在被使用了
kibana@e4ef8014ad58:~$ ./bin/kibana
[2022-11-07T09:58:18.929+00:00][INFO ][node] Kibana process configured with roles: [background_tasks, ui]
[2022-11-07T09:58:40.484+00:00][INFO ][plugins-service] Plugin "cloudExperiments" is disabled.
[2022-11-07T09:58:40.495+00:00][INFO ][plugins-service] Plugin "profiling" is disabled.
[2022-11-07T09:58:40.580+00:00][FATAL][root] Error: Port 5601 is already in use. Another instance of Kibana may be running!
at Root.shutdown (/usr/share/kibana/src/core/server/root/index.js:81:18)
at Root.preboot (/usr/share/kibana/src/core/server/root/index.js:50:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at bootstrap (/usr/share/kibana/src/core/server/bootstrap.js:99:9)
at Command. (/usr/share/kibana/src/cli/serve/serve.js:216:5)
FATAL Error: Port 5601 is already in use. Another instance of Kibana may be running!
但查了一下并不能知道是那个程序在用,导致也没法释放该端口。
root@e4ef8014ad58:/usr/share/kibana# netstat -nltp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5601 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.11:37159 0.0.0.0:* LISTEN -
请问有什么办法解决这个问题吗?
用 netstat -lntup | grep 5601 看看
如果这命令不行,你用 ss -lntup | grep 5601 看看输出。
看看是否能演示出PID出来,之后KILL 掉