The problem

The problem is that this happens:

$ docker network create  alpine4
Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

Notwithstanding that I have no non-builtin docker networks created.

The logs suggest that these network ranges are being attempted:

DEBU[2018-08-08T17:21:00.877120275Z] ReleasePool(LocalDefault/192.168.240.0/20)   
DEBU[2018-08-08T17:21:00.877135316Z] ReleasePool(LocalDefault/192.168.224.0/20)   
DEBU[2018-08-08T17:21:00.877162150Z] ReleasePool(LocalDefault/192.168.208.0/20)   
DEBU[2018-08-08T17:21:00.877170059Z] ReleasePool(LocalDefault/192.168.192.0/20)   
DEBU[2018-08-08T17:21:00.877176154Z] ReleasePool(LocalDefault/192.168.176.0/20)   
DEBU[2018-08-08T17:21:00.877198642Z] ReleasePool(LocalDefault/192.168.160.0/20)   
DEBU[2018-08-08T17:21:00.877204723Z] ReleasePool(LocalDefault/192.168.144.0/20)   
DEBU[2018-08-08T17:21:00.877212452Z] ReleasePool(LocalDefault/192.168.128.0/20)   
DEBU[2018-08-08T17:21:00.877220350Z] ReleasePool(LocalDefault/192.168.112.0/20)   
DEBU[2018-08-08T17:21:00.877232829Z] ReleasePool(LocalDefault/192.168.96.0/20)    
DEBU[2018-08-08T17:21:00.877243072Z] ReleasePool(LocalDefault/192.168.80.0/20)    
DEBU[2018-08-08T17:21:00.877253643Z] ReleasePool(LocalDefault/192.168.64.0/20)    
DEBU[2018-08-08T17:21:00.877264171Z] ReleasePool(LocalDefault/192.168.48.0/20)    
DEBU[2018-08-08T17:21:00.877274553Z] ReleasePool(LocalDefault/192.168.32.0/20)    
DEBU[2018-08-08T17:21:00.877284675Z] ReleasePool(LocalDefault/192.168.16.0/20)    
DEBU[2018-08-08T17:21:00.877296023Z] ReleasePool(LocalDefault/192.168.0.0/20)     
DEBU[2018-08-08T17:21:00.877307062Z] ReleasePool(LocalDefault/172.31.0.0/16)      
DEBU[2018-08-08T17:21:00.877322208Z] ReleasePool(LocalDefault/172.30.0.0/16)      
DEBU[2018-08-08T17:21:00.877333550Z] ReleasePool(LocalDefault/172.29.0.0/16)      
DEBU[2018-08-08T17:21:00.877339489Z] ReleasePool(LocalDefault/172.28.0.0/16)      
DEBU[2018-08-08T17:21:00.877350224Z] ReleasePool(LocalDefault/172.27.0.0/16)      
DEBU[2018-08-08T17:21:00.877361031Z] ReleasePool(LocalDefault/172.26.0.0/16)      
DEBU[2018-08-08T17:21:00.877367371Z] ReleasePool(LocalDefault/172.25.0.0/16)      
DEBU[2018-08-08T17:21:00.877374978Z] ReleasePool(LocalDefault/172.24.0.0/16)      
DEBU[2018-08-08T17:21:00.877382471Z] ReleasePool(LocalDefault/172.23.0.0/16)      
DEBU[2018-08-08T17:21:00.877395020Z] ReleasePool(LocalDefault/172.22.0.0/16)      
DEBU[2018-08-08T17:21:00.877405540Z] ReleasePool(LocalDefault/172.21.0.0/16)      
DEBU[2018-08-08T17:21:00.877415851Z] ReleasePool(LocalDefault/172.20.0.0/16)      
DEBU[2018-08-08T17:21:00.877426869Z] ReleasePool(LocalDefault/172.19.0.0/16)      
DEBU[2018-08-08T17:21:00.877437210Z] ReleasePool(LocalDefault/172.18.0.0/16)    

Even stranger, if I pick any of those subnet ranges to use as an explicit subnet range, creation works just fine:

$ docker network create --subnet 172.31.0.0/16 alpine3
189ec86443c0799a298f672497aa24fb17dc725d810cd6c3917555ae6c185012

The question

Given the above, why can't I just create a bridge network and have docker pick a subnet range for me?

Setup

$ dockerd --version
Docker version 18.03.1-ce, build 9ee9f40

Running on ubuntu 16.04 in aws. Installed using the official .deb, no special configs in place (indeed, no daemon.json at all)

Do you need to run it beside a VPN "OpenVPN service" ?

I think using below would solve the issue for clearing any unused networks by at least 1 container.

$ docker network prune
  • As stated, I have no non-builtin docker networks created, so there is nothing to prune. There is no vpn service running. – Marcin Aug 9 at 18:48
  • So you may try to see the created networks and remove any unneeded networks, you may post the result for the below command. # docker network ls – lORD 2 days ago
  • Right, there are only the three builtin networks. – Marcin 2 days ago
  • So could you try to run prune command and retest once again ? – lORD yesterday
  • Let me be clear: I have no non-built in networks to prune. You think the problem is that there a bunch of existing networks. There are not. – Marcin yesterday

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.