Docker Community Forums

Share and learn in the Docker community.

Dockerd: start-up error "no available network"


(Mikma) #1

How do you disable the auto-detection which causes the error “no available network” when starting dockerd? I have tried specifying the network I want to use with the --bip option but it didn’t work.

Versions:
Ubuntu 18.04 x86_64
docker 17.12.1

To reproduce use these steps:

1.Reinstall docker. (Should remove /var/lib/docker/network/files/local-kv.db where the network settings seem to be stored.)

2.Add these routes:

ip route add unreachable 172.16.0.0/12 
ip route add unreachable 192.168.0.0/16

Start dockerd:

# dockerd --bip 10.3.2.1/24
...
Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network

Edit: A workaround is to run docker in it’s own isolated network namespace for example using systemd-named-netns. This means docker will not be confused with the routes since it will see the default route only (and the network used on the link between the docker and primary network namespaces.)