43

I'm trying to setup docker and I`m getting the following error:

ERROR: Pool overlaps with other one on this address space

What should I do to solve it,please?

bruna_dosti
  • 439
  • 1
  • 4
  • 5
  • You receive it during installation of docker or when trying to run some container? – Michał Krzywański Jun 09 '19 at 15:39
  • 3
    Please provide the command you run and your docker-compose file. Have you specified the network and renamed if after run it once? That error suggest a conflict. You could list the network `docker network ls` and delete the existing one should you find it `docker network rm my_network`. – thoroc Sep 17 '19 at 11:55

5 Answers5

65

Could you provide us with the command you have run as well as your docker-compose.yml file please?

The error you are encountering is suggesting you have a network address conflict. To check that you could run: docker network ls to list all the docker network running currently on your machine.

Once you have identified the culprit you should be able to remove it with the following command: docker network rm my_network (where my_network is the one you have created initially)

thoroc
  • 3,291
  • 2
  • 27
  • 34
16

if you don't mind delete all docker networks, you could run

docker network rm $(docker network ls -q)
Adán Escobar
  • 1,729
  • 9
  • 15
15
docker network prune

Worked for me.

AlwaysLearning
  • 2,385
  • 1
  • 15
  • 18
6

remove one or more network in the result of docker network ls with docker network rm ID

Hamid Shariati
  • 546
  • 6
  • 18
0

Most likely You try to create a network, which overlaps with an already running container. You may have a docker-compose.yaml file which defines a network with a fixed address.

networks:
        hosting:
            ipv4_address: 192.168.200.80

The grep Your interfaces

$ ip addr | grep 192.168
    inet 192.168.2.2/24 brd 192.168.2.255 scope global noprefixroute enp1s0
    inet 192.168.16.1/20 brd 192.168.31.255 scope global br-425bf896730c
    inet 192.168.192.1/20 brd 192.168.207.255 scope global br-7bf61cfc0b5a
    inet 192.168.48.1/20 brd 192.168.63.255 scope global br-ad263cc0cb22

Notice that 192.168.192.1/20 overlaps with 192.168.200.80

Now br-7bf61cfc0b5a means that the docker network id is 7bf61cfc0b5a

$ docker network ls | grep 7bf61cfc0b5a
7bf61cfc0b5a   openvpn_default          bridge    local

Close openvpn and remove the network

Now the network with the fixed address can go up. Afterwards, openvpn can be started again, and now it will have another automatically assigned IP range.

Kjeld Flarup
  • 1,471
  • 10
  • 15