moby: Cannot create docker network: "could not find an available predefined network"
Output of docker version
:
Client:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 20:45:29 2016
OS/Arch: linux/amd64
Server:
Version: 1.12.0-rc2
API version: 1.24
Go version: go1.6.2
Git commit: 906eacd
Built: Fri Jun 17 20:45:29 2016
OS/Arch: linux/amd64
Output of docker info
:
Containers: 5
Running: 0
Paused: 0
Stopped: 5
Images: 178
Server Version: 1.12.0-rc2
Storage Driver: overlay
Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: default
Default Runtime: default
Security Options: seccomp
Kernel Version: 4.4.11-23.53.amzn1.x86_64
Operating System: Amazon Linux AMI 2016.03
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.679 GiB
Name: ip-10-0-99-26
ID: EHXQ:TLQP:HDFH:FY3W:ZADZ:PCUE:6GHO:NT5D:VAD3:G7J7:G5S6:7WXO
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: saada
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Additional environment details (AWS, VirtualBox, physical, etc.):
$ uname -r
4.4.11-23.53.amzn1.x86_64
Steps to reproduce the issue:
- create a docker network
Describe the results you received: Failing command
$ docker network create test
Error response from daemon: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network
Docker daemon log output in /var/log/docker
time="2016-06-26T23:59:24.698380120Z" level=error msg="Handler for POST /v1.22/networks/create returned error: failed to parse pool request for address space \"LocalDefault\" pool \"\" subpool \"\": could not find an available predefined network"
Describe the results you expected:
docker network create test
d992f3556b03d0b780eff1e289650e43533140eef9d38620e62d94b5efa28b89
Additional information you deem important (e.g. issue happens only occasionally):
I’m creating a lot of networks since this is on a CI server. The issue tends to happen once in a while and I end up fixing it via rm -rf /var/lib/docker/network/files
and restart the daemon. This workaround doesn’t always work and is flaky.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 25 (11 by maintainers)
Links to this issue
Commits related to this issue
- Use Docker Compose to bring down services Docker Compose creates networks within the context of Docker in order to provide a communication mechanism between services. Because Docker Compose was respo... — committed to raster-foundry/raster-foundry by deleted user 8 years ago
- Use Docker Compose to bring down services Docker Compose creates networks within the context of Docker in order to provide a communication mechanism between services. Because Docker Compose was respo... — committed to raster-foundry/raster-foundry by deleted user 8 years ago
- Use Docker Compose to bring down services Docker Compose creates networks within the context of Docker in order to provide a communication mechanism between services. Because Docker Compose was respo... — committed to raster-foundry/raster-foundry by deleted user 8 years ago
It works for me:
kill -9 $(pidof openvpn)
docker-compose up -d
Now, you can run openvpn again.
I’ve just hit this wall as well.
Some testing;
Is there anyway to allocate a bigger network for docker to pick from?
@thalesfsp use:
docker network ls
- to list networksdocker network rm
- to remove networkYou can remove all unused networks with
docker network prune
I found this helpful: https://docs.docker.com/compose/reference/down/
docker-compose down
which is equivalent of astop
,rm
, and cleans up networks for you. I couldn’t figure out how to setup the subnet correctly. It would be great to have some documentation on how that works.@saada When user does not specify
--subnet
during network creation, the default ipam driver tries to auto-assign a subnet from a list of predefined pools, given it does not overlap with any route on your host. There are around 31 predefined pools.How many networks did you have when the issue was encountered ? I am trying to see if this is a legitimate failure, whether the limit was or not reached.