Error response from daemon: all predefined address pools have been fully subnetted.
To Reproduce
- Create a application
- Click Deploy
- Get this error
When I attempt to create a new application, I encounter the following Docker error:
Error response from daemon: all predefined address pools have been fully subnetted.
Could you advise on how to resolve this issue?
Current vs. Expected behavior
Following the steps from the previous section.
Provide environment information
Ubuntu 24.04
Dokploy Version v0.22.6
Which area(s) are affected? (Select all that apply)
Application
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
No
@aleksander-pankow This sounds like an issue with normal docker networks ( for swarm overlays, you shouldn't see this error)
the default subnet for normal docker networks, means you can only have 32? or so networks before all address pools are exhausted.
solution
-
remove unused docker networks
-
alter the default address pool in
/etc/docker/daemon.jsonto be something like the following ( a docker restart would be required):
{
"default-address-pools" : [
{
"base" : "172.17.0.0/12",
"size" : 20
},
{
"base" : "192.168.0.0/16",
"size" : 24
}
]
}
edit address range as required but this will now give you 512 networks, with range of 256 - 4096 hosts per network depending on base
for swarm overlays, the default is 10.0.0.0/8 where each mask is /24 meaning you have a huge number of networks, each limited to 256 hosts so i doubt this is swarm overlay error
alter the default address pool in /etc/docker/daemon.json
Folder is empty. I read this information in forums, but I don't have /etc/docker/daemon.json.
Console log:
root@host:~# cd /etc/docker/
root@host:/etc/docker# ls
root@host:/etc/docker#
@aleksander-pankow then create the file, with those contents if the file doesn't exist
i will add you should really add the default logging options in there as well, otherwise you end up with too many log files
{
"log-driver": "json-file",
"log-opts": {
"max-file": "3",
"max-size": "10m"
},
"default-address-pools" : [
{
"base" : "172.17.0.0/12",
"size" : 20
},
{
"base" : "192.168.0.0/16",
"size" : 24
}
]
}
i will add, this won't magically fix your situation, unless you remove existing networks, since they have already been created with the old subnets
You can also try to run docker network prune, usually this cleanup all the unused networks It may help, although there are also certain operating systems that may have limitations in terms of networking.
You can run docker network prune
For now we can close this issue.