docker上的“地址已经使用”错误 – 组成

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

 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的build议之后,我试过了命令

 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