moby: Bind address already in use (introduced in 1.3)
After upgrading to 1.3 lots of create attempts throw an Error 500 indicating that address already in use.
Is there anything that I could do on my behalf to eliminate such errors or is there any issue with releasing bound addresses?
Error message example
Cannot start container e72d935d52d7bfc7412e8d60bf1c5705b54e33056c15cca5b902cca960f7b71a: Error starting userland proxy: listen tcp 0.0.0.0:49532: bind: address already in use
uname -a
Linux paris 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
docker version
Client version: 1.3.0
Client API version: 1.15
Go version (client): go1.3.3
Git commit (client): c78088f
OS/Arch (client): linux/amd64
Server version: 1.3.0
Server API version: 1.15
Go version (server): go1.3.3
Git commit (server): c78088f
docker -D info
Containers: 16
Images: 128
Storage Driver: devicemapper
Pool Name: docker-202:1-525407-pool
Pool Blocksize: 65.54 kB
Data file: /dev/direct-lvm/data
Metadata file: /dev/direct-lvm/metadata
Data Space Used: 3.111 GB
Data Space Total: 81.6 GB
Metadata Space Used: 18.33 MB
Metadata Space Total: 4.291 GB
Library Version: 1.02.82-git (2013-10-04)
Execution Driver: native-0.2
Kernel Version: 3.13.0-36-generic
Operating System: Ubuntu 14.04.1 LTS
Debug mode (server): false
Debug mode (client): true
Fds: 43
Goroutines: 72
EventsListeners: 0
Init Path: /usr/bin/docker
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 1
- Comments: 72 (21 by maintainers)
Commits related to this issue
- Try other port on any error from Map Sometimes other programs can bind on ports from our range, so we just skip this ports on allocation. Fixes #9293 Probably fixes #8714 Signed-off-by: Alexander M... — committed to mapuri/docker by LK4D4 10 years ago
- Update lxc-docker to 1.5.0 for iso build lxc-docker-1.3.2 has upstream issue https://github.com/docker/docker/issues/8714 which causes failures in allocating ports dynamically. Updating resolves this... — committed to openstack-archive/fuel-main by mattymo 9 years ago
I got the same problem using Docker for mac 1.11.0-beta9 (965e3f981d73fe82857f3c1439ba3dc1acaecab6) with docker-compose 1.7. As @edanShavit said, few seconds later the port was available and the nginx container could start again.
I’m also seeing this with 1.11.2
same problem here
Docker version 1.11.2, build b9f10c9 Linux df01 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
netstat -lnp | grep 8086
and
ps aux | grep docker | grep 8086
return nothing
I’m seeing this on 1.8.1 on Ubuntu 14.04.3 LTS
Got hit by this today. On a recent version of docker 1.10.3. Only on few certain containers. The same ones each time.
Things have tried, to no avail:
*.sock
in/var/lib/docker/network/files
Perhaps the last measure is more preventative. And will prove effective against repeat occurence. But current containers still broken for those ip(s).
Unfortunately for these particular container(s), changing their IP address isn’t so strightforward due to their hard-coded IP being used in other devices config… So a way to clean state would also be appreciated.