libnetwork: Unable to create more than 4 networks.

Issue

It seems as though I am unable to create more than 4 networks before I start getting Error response from daemon: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network errors.

Example

Active Networks:

# docker network ls
NETWORK ID          NAME                                       DRIVER
5849372c9920        bridge                                     bridge
4aed776fb7db        host                                       host
93eba83fc4bd        workspace_default                          bridge
b16948421d33        none                                       null

Which is the three defaults and one created by docker-compose.

Then when I attempt to create additional networks the following happens.

# for i in $(seq 1 40); do echo $i; docker network create "test$i"; done
1
05cb052f58404eba674d8fd4f9e3e39897c8167966fd3d18b6984789e57bcb81
2
7e6bf138743070f26a17ba285c2d4994350fcb90f59ab748826f2847d2f1c831
3
a3c1e54fc972f1ceac917aafc48a16e5b2231c715ca3285daf3d21c087dd15e7
4
Error response from daemon: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network
5
Error response from daemon: failed to parse pool request for address space "LocalDefault" pool "" subpool "": could not find an available predefined network
6
...

Creation of all other networks fails until I remove the ones I just created.

It is my understanding that the default pool should allow for ~31 networks. However I’m reaching a total of 7.

Additional Information

# docker --version
Docker version 1.10.2, build c3959b1

# uname -a
Linux jenkins02 3.19.0-49-generic #55~14.04.1-Ubuntu SMP Fri Jan 22 11:24:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.3 LTS
Release:    14.04
Codename:   trusty

# ip route
default via 10.10.9.1 dev eth0
10.10.9.0/24 dev eth0  proto kernel  scope link  src 10.10.9.40
172.17.0.0/16 dev docker0  proto kernel  scope link  src 172.17.0.1
172.19.0.0/16 dev br-61a0b1f644db  proto kernel  scope link  src 172.19.0.1
172.22.0.0/16 dev br-93eba83fc4bd  proto kernel  scope link  src 172.22.0.1
172.99.19.0/24 dev br-0a56d7229a9d  proto kernel  scope link  src 172.99.19.1
172.99.51.0/24 dev br-e6440eac3257  proto kernel  scope link  src 172.99.51.1
192.168.16.0/20 dev br-fe0745b2b6b9  proto kernel  scope link  src 192.168.16.1

I suspect this issue is related to: https://github.com/docker/libnetwork/issues/951 and https://github.com/docker/compose/issues/2279

Can anyone provide some insight or suggestions as to how to debug what is going on here?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 22 (10 by maintainers)

Most upvoted comments

@saada That worked like a charm! Thanks! šŸ‘

@aboch Yea, the key was updating to 1.12. I’m just trying to leave a trail so others can avoid the same frustrations 😃

To recap:

  1. Update to docker 1.12
  2. Use docker-compose down to clean up, not docker-compose stop followed by docker-compose rm -f