I have the same symptom (EADDRINUSE
) as described in Port mappings are not released however, for a different root case and even before having started any container:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
$ docker run --rm -p 62374:62374 alpine sh
docker: Error response from daemon: driver failed programming external connectivity on endpoint desperate_swirles (35f4a1f10d9936897d428c99654a912f6947c42becca13f62dfb5fa2ae0cfa25): Error starting userland proxy: listen tcp 0.0.0.0:62374: bind: address already in use.
$ docker run --pid=host --net host --rm -it alpine sh
/ # netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 :::62374 :::* LISTEN -
tcp 0 0 :::2375 :::* LISTEN -
I understand that port 2375
is the docker daemon, but I can’t find any reference to port 62374
. So when starting any container that needs to bind port 62374
(or a docker-compose manifest with a range of ports including this one) it fails with:
ERROR: for frontend driver failed programming external connectivity on endpoint myservice_1 (7a4f7ab3ec3be4b8a8b317d0630aaf4516dce71c303bf15b14266da77c2dc35a): Error starting userland proxy: listen tcp 0.0.0.0:62374: bind: address already in use
It’s at least interesting that I can’t even find a reference to it when using ps
nor lsof
in the container nor on my host.
$ lsof -n -P -i -s 'TCP:LISTEN'
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
UserEvent 283 uwe 4u IPv4 0xb4ae9943322499d1 0t0 UDP *:*
SystemUIS 328 uwe 9u IPv4 0xb4ae994332249769 0t0 UDP *:*
SystemUIS 328 uwe 10u IPv4 0xb4ae994332247f59 0t0 UDP *:*
SystemUIS 328 uwe 13u IPv4 0xb4ae99433224a371 0t0 UDP *:53372
SystemUIS 328 uwe 15u IPv4 0xb4ae99433224a841 0t0 UDP *:*
sharingd 339 uwe 12u IPv4 0xb4ae994334cb80e9 0t0 UDP *:*
sharingd 339 uwe 16u IPv4 0xb4ae994332249c39 0t0 UDP *:*
2BUA8C4S2 924 uwe 13u IPv4 0xb4ae99434085fd51 0t0 TCP 127.0.0.1:6258 (LISTEN)
2BUA8C4S2 924 uwe 14u IPv6 0xb4ae994332faaf19 0t0 TCP [::1]:6258 (LISTEN)
2BUA8C4S2 924 uwe 15u IPv4 0xb4ae994340860659 0t0 TCP 127.0.0.1:6263 (LISTEN)
2BUA8C4S2 924 uwe 16u IPv6 0xb4ae99433d259979 0t0 TCP [::1]:6263 (LISTEN)
WiFiAgent 948 uwe 7u IPv4 0xb4ae994334b01109 0t0 UDP *:*
Dropbox 995 uwe 62u IPv6 0xb4ae99433d274ed9 0t0 TCP *:17500 (LISTEN)
Dropbox 995 uwe 69u IPv4 0xb4ae994343479f61 0t0 TCP *:17500 (LISTEN)
Dropbox 995 uwe 82u IPv4 0xb4ae994340a9fcf1 0t0 UDP *:17500
Dropbox 995 uwe 88u IPv4 0xb4ae994343481d51 0t0 TCP 127.0.0.1:17600 (LISTEN)
Dropbox 995 uwe 97u IPv4 0xb4ae994342a61449 0t0 TCP 127.0.0.1:17603 (LISTEN)
com.docke 1128 uwe 11u IPv4 0xb4ae994334cb9691 0t0 UDP *:54814
SpotifyWe 1205 uwe 6u IPv4 0xb4ae994342966659 0t0 TCP 127.0.0.1:4370 (LISTEN)
SpotifyWe 1205 uwe 7u IPv4 0xb4ae994342965d51 0t0 TCP 127.0.0.1:4380 (LISTEN)
/ # lsof -n -P -i
2571 /bin/busybox /0
2571 /bin/busybox /0
2571 /bin/busybox /0
2571 /bin/busybox /dev/tty
$ ps aux | grep 62374
$
/ # ps aux | grep 62374
/ #
This was not the case in beta <=8 iirc and could be since VPN mode was used / set by default.
Could you elaborate why this port is bound and by what?