ERROR: could not find an available, non-overlapping IPv4 address pool
I always run into the same error when trying to install Bitwarden.
Situation: Fresh Debian install
- Installed docker according to: https://docs.docker.com/install/linux/docker-ce/debian/
- Installed docker-compose according to: https://docs.docker.com/compose/install/
- I had to manually add docker0 bridge network (after a few googles) because this is nowhere mentioned on docker documentation post install instructions
Now I still run into network problems. An output of ./bitwarden.sh update
srvadmin@server:~$ sudo ./bitwarden.sh update
_ _ _ _
| |__ (_) |___ ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V V / (_| | | | (_| | __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_|
Open source password management solutions
Copyright 2015-2019, 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden
===================================================
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01
Removing network docker_default
WARNING: Network docker_default not found.
1.29.0: Pulling from bitwarden/setup
Digest: sha256:780d9be9b39175649cec20c1f38100adce96f59b4c6ee52235c1d246cf1a55f0
Status: Image is up to date for bitwarden/setup:1.29.0
Building docker environment files.
Building docker environment override files.
Building nginx config.
Building FIDO U2F app id.
Building docker-compose.yml.
Removing network docker_default
WARNING: Network docker_default not found.
Pulling mssql ... done
Pulling web ... done
Pulling attachments ... done
Pulling api ... done
Pulling identity ... done
Pulling admin ... done
Pulling icons ... done
Pulling notifications ... done
Pulling nginx ... done
Using default tag: latest
latest: Pulling from certbot/certbot
Digest: sha256:36a2015e2b048646a9e9c972307fd33ab20dfe3e41b2e1639e6c806ff7987c13
Status: Image is up to date for certbot/certbot:latest
Saving debug log to /etc/letsencrypt/logs/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Processing /etc/letsencrypt/renewal/server.louckx.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not yet due for renewal
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The following certs are not due for renewal yet:
/etc/letsencrypt/live/server.louckx.com/fullchain.pem expires on 2019-05-17 (skipped)
No renewals were attempted.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Creating network "docker_default" with the default driver
ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
My ip address configuration:
srvadmin@server:~$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:22:4d:ab:20:68 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.20/24 brd 192.168.0.255 scope global enp1s0
valid_lft forever preferred_lft forever
inet6 2a02:1810:1dbf:6b00:22:4dff:feab:2068/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::222:4dff:feab:2068/64 scope link
valid_lft forever preferred_lft forever
3: enp2s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 68:05:ca:1c:a2:7a brd ff:ff:ff:ff:ff:ff
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:4b:cf:07:5a brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:4bff:fecf:75a/64 scope link
valid_lft forever preferred_lft forever
Clearly I am missing some network configuration, but it seems I'm the only one who has to do this all manually... other walkthroughs on the internet execute the instructions given on the install page and get a working installation.
Note: sudo docker run hello-world works like a charm
Seems like a docker-compose issue. A quick google search on the problem presents many related results. ex https://stackoverflow.com/questions/43720339/docker-error-could-not-find-an-available-non-overlapping-ipv4-address-pool-am
In my case it was an issue with docker_gwbridge docker network. This network was missing on the worker node which result following error on that worker node.
Error:
network sandbox join failed: subnet sandbox join failed for "14.2.1.0/24": error creating vxlan interface: file exists
starting container failed: error creating external connectivity network: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
To fix the above errors i have created the docker network manually using below command..
docker network create \
--subnet 172.18.0.0/16 \
--gateway 172.18.0.1 \
-o com.docker.network.bridge.enable_icc=false \
-o com.docker.network.bridge.name=docker_gwbridge \
docker_gwbridge
I experienced this error too. I noticed that connecting to a vpn causes this issue so I turned the vpn off and tried again and it worked.
I experienced this error too. I noticed that connecting to a vpn causes this issue so I turned the vpn off and tried again and it worked.
Any idea why though? Or where to look to figure out why? I'd like to be able to run these commands without having to toggle my VPN.
In my case, the pool of IP addresses used by GlobalProtect (VPN) conflicted with the default pool of addresses used by the Docker daemon. So changing the daemon.json file and restarting Docker (permanent fix) OR explicitly setting the pool range in docker-compose (temp fix) resolves the issue.
Same as @tohidplus, GlobalProtect (VPN) was breaking docker network creation.
@tohidplus thats it!
In my case, the number of Docker networks reached the limit.
According to Jarek Lipski's post on Medium.com, I learned that there is a "31" limitation.
So, I docker network ls | wc -l to count lines, terminal shows 33. Exclude the header of the network list and the default bridge, there are 31 networks. Most of them were created with old docker projects.
I docker network ls, pick some useless networks, docker network rm NETWORK_ID.
Fixed.
Closing this, as issue had to do with local network configurations. A thank you to all of you for providing support and possible solutions.