gpt4 book ai didi

docker - docker-compose up 时出现 "Address already in use"错误

转载 作者:IT老高 更新时间:2023-10-28 12:38:28 27 4
gpt4 key购买 nike

我正在尝试使用 docker-compose up 启动多个 docker 容器,但我收到以下(部分)错误消息:

Recreating 1faf02f5d67e_1faf02f5d67e_1faf02f5d67e_1faf02f5d67e_1faf02f5d67e_ipercroncompose_rabbitmq_1

ERROR: for rabbitmq Cannot start service rabbitmq: driver failed programming external connectivity on endpoint ipercroncompose_rabbitmq_1 (a8ded956e30b922289614bbbc4e4fb773c58688d395895b575a88b638592df94): Error starting userland proxy: listen tcp 0.0.0.0:5672: bind: address already in use
ERROR: Encountered errors while bringing up the project.

遵循 https://github.com/docker/docker/issues/8714 的建议, 我试过命令

netstat -pna | grep 5672

导致

(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN -
tcp6 0 0 :::5672 :::* LISTEN -
unix 2 [ ] DGRAM 15672 -

但是,我在这里看不到任何可以杀死的进程 ID。任何想法是什么导致了这个错误?

最佳答案

关注 https://unix.stackexchange.com/questions/106561/finding-the-pid-of-the-process-using-a-specific-port ,而不是 netstat 我使用 lsof -i:

kurt@kurt-ThinkPad:~$ sudo lsof -i :5672 | grep LISTEN
[sudo] password for kurt:
beam.smp 953 rabbitmq 52u IPv6 33026 0t0 TCP *:amqp (LISTEN)

运行 sudo kill 953 后,我能够运行 docker-compose up

关于docker - docker-compose up 时出现 "Address already in use"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40266556/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com