Docker “ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network”

前端 未结 19 643
别那么骄傲
别那么骄傲 2020-12-12 10:48

I have a directory apkmirror-scraper-compose with the following structure:

.
├── docker-compose.yml
├── privoxy
│   ├── config
│   └── Dockerfil         


        
19条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 11:28

    I had an identical problem with the same error message but the solution with removal of unused docker networks didn't help me. I've deleted all non-default docker networks (and all images and containers as well) but it didn't help - docker still was not able to create a new network.

    The cause of the problem was in network interfaces that were left after OpenVpn installation. (It was installed on the host previously.) I found them by running ifconfig command:

    ...
    tun0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.2  P-t-P:10.8.0.2  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:75 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:84304 (84.3 KB)  TX bytes:0 (0.0 B)
    
    tun1  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.2  P-t-P:10.8.0.2  Mask:255.255.255.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:200496 errors:0 dropped:0 overruns:0 frame:0
          TX packets:148828 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:211583838 (211.5 MB)  TX bytes:9568906 (9.5 MB)
    ...
    

    I've found that I can remove them with a couple of commands:

    ip link delete tun0
    ip link delete tun1
    

    After this the problem has disappeared.

提交回复
热议问题