Skip to content
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 starting daemon: Error initializing network controller: list bridge addresses failed: no available network #35121

Closed
hubotx opened this issue Oct 7, 2017 · 12 comments

Comments

@hubotx
Copy link

hubotx commented Oct 7, 2017

Description

I have physical machine with Gentoo as host OS for Docker containers. I have compiled kernel using instructions on page https://wiki.gentoo.org/wiki/Docker#Kernel and I have installed Docker from Gentoo repository (see on the section Additional environment details (AWS, VirtualBox, physical, etc.)). I have set following USE flags:

>=app-emulation/docker-17.03.2 pkcs11 overlay device-mapper container-init btrfs aufs

I have emerged Docker and added it to boot level default in OpenRC init system. After compiling kernel and Docker I wanted to check if Docker is working so I typed docker info in terminal and I got error. I have decided to check what is wrong and I need your help with solving issue.

Steps to reproduce the issue:

  1. Issue the docker version command.
  2. Try get Docker system-wide informations using docker info.
  3. Check Docker daemon status.
  4. Check Docker logs.

Describe the results you received:
In the output of docker version (see below) you can see error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?. The same message appears if I try get Docker system-wide informations. The same error appears if I try run the same command prepending by sudo, so this error applies to daemon. I tried to check if there a mistake in Docker daemon privileges. Based on these messages I am able to say that maybe Docker daemon not running. I checked daemon status to make sure. Docker daemon is crashed. To see the reason, I looked at the logs.

Output of cat /var/log/docker.log:

pecan@tux ~ $ cat /var/log/docker.log 
time="2017-10-07T14:52:13.178261811+02:00" level=info msg="libcontainerd: new containerd process, pid: 32311" 
time="2017-10-07T14:52:14.434232306+02:00" level=info msg="Graph migration to content-addressability took 0.00 seconds" 
time="2017-10-07T14:52:14.434413425+02:00" level=warning msg="Your kernel does not support cgroup blkio weight" 
time="2017-10-07T14:52:14.434423960+02:00" level=warning msg="Your kernel does not support cgroup blkio weight_device" 
time="2017-10-07T14:52:14.434759986+02:00" level=info msg="Loading containers: start." 
time="2017-10-07T14:52:14.437180876+02:00" level=info msg="Firewalld running: false" 
Error starting daemon: Error initializing network controller: list bridge addresses failed: no available network

Describe the results you expected:

docker info should return Docker system-wide informations instead of Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

Expected output of docker version:

pecan@tux ~ $ docker version
Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.9.1
 Git commit:   f5ec1e2
 Built:        Sat Oct  7 14:50:59 2017
 OS/Arch:      linux/amd64

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

pecan@tux ~ $ docker version
Client:
 Version:      17.03.2-ce
 API version:  1.27
 Go version:   go1.9.1
 Git commit:   f5ec1e2
 Built:        Sat Oct  7 14:50:59 2017
 OS/Arch:      linux/amd64
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Output of docker info:

pecan@tux ~ $ docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Output of sudo docker info:

pecan@tux ~ $ sudo docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Output of sudo service docker status:

pecan@tux ~ $ sudo service docker status
 * status: crashed

Additional environment details (AWS, VirtualBox, physical, etc.):
I am using Gentoo as Host OS for Docker containers. I have compiled kernel using instructions on page https://wiki.gentoo.org/wiki/Docker#Kernel and I have installed Docker from Gentoo repository.

Host system informations:

pecan@tux ~ $ uname -a
Linux tux 4.12.12-gentoo #8 SMP Sat Oct 7 13:58:47 CEST 2017 x86_64 Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz GenuineIntel GNU/Linux

I have disabled iptables and ip6tables because firewall is not actually properly configured. I am connecting to internet through VPN and I am using 8.8.8.8 and 8.8.4.4 DNS providers. I have running Tor and Privoxy daemons and I am using OpenRC init system.

@thaJeztah
Copy link
Member

This looks like an issue in your environment, not a bug; when starting the daemon, the daemon will look for non conflicting IP-ranges to use for the container network; the error that's printed indicates that the daemon is not able to get network access to find available ranges.

It may be worth running the check-config script to see if anything is missing on your machine; https://github.com/moby/moby/blob/master/contrib/check-config.sh

Starting the daemon in debug mode (using the --debug flag on dockerd, or "debug": true in your daemon.json) may reveal more information.

However, Docker does not maintain the packages for Gentoo, and Docker 17.03 has reached end of life, so your best road to support may be the Gentoo maintainers.

Please keep in mind that the GitHub issue tracker is not intended as a general support forum,
but for reporting bugs and feature requests. For other type of questions, consider using one of;

I'm going to close this issue because this does not look like a bug, but feel free to continue the conversation 👍

@traktofon
Copy link

Just encountered the same issue with Docker Edge on Ubuntu 17.10.

# docker --version
Docker version 17.11.0-ce, build 1caf76c

while being connected to my usual home network (192.168.0.0/24) and while being connected to a VPN (10.x.y.0/24). After turning off the VPN, Docker started and assigned itself the 172.17.0.0/16 network.

@thaJeztah, you say

when starting the daemon, the daemon will look for non conflicting IP-ranges to use for the container network; the error that's printed indicates that the daemon is not able to get network access to find available ranges.

If so, I would consider this a bug in the Docker code that determines a suitable IP range, because the range that it chose in the end doesn't conflict with the ones that were in use when it failed.

@ucyo
Copy link

ucyo commented Jan 22, 2018

I have the same bug as @traktofon in debian buster. Additionally I doubt it is related to VPN. VPN is off and not configured on Debian. My Mac running in the same network has no problems with starting docker.

Debian Buster

# docker -v
Docker version 17.11.0-ce, build 1caf76cr

Macintosh

# docker -v
Docker version 17.12.0-ce, build c97c6d6

@iprok
Copy link

iprok commented Aug 29, 2018

I confirm the issue when openvpn with network 10...* is connected not regarding linux distribution. @thaJeztah can you reopen please and investigate the issue further.

@crabdancing
Copy link

crabdancing commented Sep 13, 2018

I too am using OpenVPN and have this issue.

Edit: I just shut off my VPN and it stopped breaking. It's DEFINITELY the VPN in my case.

Edit2: not only is it the VPN, it happens inconsistently. When I started my openvpn.service and then started dockerd again, it ostensibly loaded properly this time.

This issue is nontrivial to debug, but it definitely exists. Please reopen this issue.

@FredrikBlix
Copy link

Me too, using openvpn. Uninstall did the trick!

@sparr
Copy link

sparr commented Jan 28, 2019

I encountered this same error while connected to a VPN. Disconnecting allowed dockerd to start up, and docker-ce package installation to finish.

@dimoibiehg
Copy link

I have the same problem. Please be sure that all VPN services are not running. I had a process for Kerio VPN and that was the source of my issue.

@kghost
Copy link

kghost commented Nov 6, 2019

@thaJeztah also encounter this, it is vpn related. please reopen this, it has already hit multiple people.

@aitorpazos
Copy link

I've encountered this but it was indeed a problem in our side. Posting some details as it may help others.
Our VPN routes added a route that overlaps with Docker's default bridges addresses.
This is a extract from the route -n command. ppp0 device is for the VPN interface and then there is the default Docker bridge and an additional one created by docker-compose:

172.16.0.0      172.16.239.20   255.240.0.0     UG    50     0        0 ppp0
172.17.0.0      0.0.0.0         255.255.255.0   U     0      0        0 docker0
172.17.1.0      0.0.0.0         255.255.255.0   U     0      0        0 br-9e2cca85e7a5

Note the 255.240.0.0 netmask in the ppp0 interface.

@markwaters306
Copy link

Got this error with a vpn connected. Disconnected and it immediately resolved this failure.

Thanks it appears to work ok once reconnect to the vpn, just fails when starting up.

@jhaprins
Copy link

jhaprins commented Oct 2, 2020

This is a bug. Complete comment with full explanation why this is a bug is in ticket: #33925

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests