-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: Pool overlaps with other one on this address space #85
Comments
Are you using The default compose file provided uses this subnet to create a bridge network and allocates static IPs to the containers. If this subnet is already in use, you can just change it to a different subnet. You'd have to change See the docker-compose.yaml file in the root of the project. |
Hi ! Thanks for the quick answer 👍 FTR I am using the docker-compose.yaml file at the root of the project There's no other docker containers running on the host while I'm doing this test. I changed the subnet to 172.20.199.1/24 and modified the other IP adresse accordingly and I still get the same error.. |
Not exactly sure about what is going on but this thread from docker might be relevant? |
Hi ! Actually it seems that a simple Sorry about that. Thanks for your help ! |
In case someone else is google'ing here: Even if the containers are down the networks are still persist. With no container running |
I think the semantics depend on how you actually stop the containers, https://docs.docker.com/compose/reference/down/ |
Working when I delete the pool network
remove the pool_network
|
İt was about the wrong ip address in compose.yml in my case |
my case, I have to tun
Then restart Docker service. |
version: "3" networks: services: ####################################################### |
docker network prune |
it´s worked for me. Thanks you. |
I have tried with docker network prune but after docker-compose up it will show again. Its not work for me. |
For me |
In case you are configuring docker networks with bridge mode and in case you are assigning pool of addresses, make sure each stack has a unique subnet, in my case I had two docker-compose files using the same subnet:
In my case, subnet 192.168.175.0/24 was used by two stacks, hence the error. |
I also had the same issue. Here is how I fixed it:
Doing these fixed the issue for me. |
@briosheje Hi, Is it possible to configure docker compose to allow stack to reuse subnets? In case I run multiple stacks for one docker-compose.yml file. I name each stack with own |
I don't think so, the cleverest is probably to create a network outside the docker-compose first, then use it in docker-compose as "external" (check here for an example: https://stackoverflow.com/questions/38088279/communication-between-multiple-docker-compose-projects), in this way the same address pool is reused (and the same network is used). |
@briosheje No, I do not want to allow containers to communicate with each other. Those are different testing context thus should be isolated. I want to run them as:
|
The answer stating to do a docker network prune or service restart are partially correct. Yes indeed it would fix the issue when there is indeed a conflict with IP range.
When restarting the compose describing [{172.108.0.0/24 map[]}], it throws the error ' Pool overlaps with other one on this address space'. The compose is exactly the same than previous run, the IPAM config did not changed, the compose project name is the same. |
You could use different subnet for each docker compose app. In my case I was creating too many networks. Here's an example of how I fixed it. networks:
default:
ipam:
config:
- subnet: 172.16.${NETWORK_ID}.0/24 And then give a unique docker compose -p proj-${BUILD_NUMBER} up --detach -e NETWORK_ID=1
docker compose -p proj-${BUILD_NUMBER} up --detach -e NETWORK_ID=2
docker compose -p proj-${BUILD_NUMBER} up --detach -e NETWORK_ID=3 If you run out of network ids (0-255) you can create a pool of numbers (0-255) and take a number from the pool for your network_id when you create the network and put it back in the pool when the compose application finishes. |
@mdakram28 Ok, We can workaround. But why I should do this if private network could be private for each stack? Like 10.0.0.0/8 networks are reusable among different offices in the world. This is no any problem that 192.168.0.1/24 is used by each router, because networks are private and isolated from each other. Same should be for containers. Why containers may not use same network if theirs networks are isolated from each other?? |
i added the network without the driver and it worked |
Change your subnet 172.* to 192.* |
I have create docker container with
|
Thank you. It halped me |
Is there any way to change the default bridge subnet 172.19.199.1/24 ? I can't start docker.service after reboot with the same error, so I can't change containers' subnet ... |
this is not assing to your own network this command tell docker compose go create new network buttt new network with this ip is exists because you created before soo use this code if you created network before: networks: |
Hi
Thanks for this projet ! Installing Mailman3 is tricky and I hope your docker images will help
However I'm getting an error at the early stage:
the host is a regular Linux box:
The docker version seems up to date
The text was updated successfully, but these errors were encountered: