我正在尝试使用seq.Date
启动多个docker容器,但我收到以下(部分)错误消息:
docker-compose up
根据https://github.com/docker/docker/issues/8714的建议,我尝试了命令
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.
导致
netstat -pna | grep 5672
但是,我在这里看不到任何可以杀死的进程ID。是什么原因造成了这个错误?
答案 0 :(得分:27)
关注https://unix.stackexchange.com/questions/106561/finding-the-pid-of-the-process-using-a-specific-port,而不是.data
array: .space 40
msg1: .asciiz "Enter 10 elements: \n"
msg2: .asciiz "terminate "
msg3: .asciiz "\n"
.text
.globl main
main:
la $t0, array
li $t1, 0
li $v0, 4
la $a0, msg1
syscall
#loop to take values
input:
li $v0, 5
syscall
sw $v0, ($t0)
addi $t0, $t0,4
addi $t1, $t1,1
blt $t1, 10, input
#re-initializing variables
li $t5 , 0
li $t1 , 0
la $t0, array
loopi:
loopj:
lw $t2, ($t0) #i
lw $t3, 4($t0) #i+1
blt $t3, $t2, swap
addi $t0, $t0,4
addi $t1, $t1,1
blt $t1,10, loopj
swap:
sw $t2, 4($t0) #i=i+1
sw $t3, ($t0)
addi $t1, $t1,1
blt $t1,10, loopj
addi $t0, $t0, 4
addi $t5, $t5, 1
blt $t5, 10, loopi
#re-initializing variables
li $t1 , 0
la $t0, array
print:
lw $v0, ($t0)
move $a0, $v0
li $v0,1
syscall
li $v0 , 4
la $a0, msg3
syscall
addi $t0, $t0,4
addi $t1, $t1,1
blt $t1, 10, print
li $v0 , 10
syscall
我使用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
。