Distribution: "ipv6": true in /etc/docker/daemon.json leads to "Error starting daemon: Error initializing network controller: Error creating default "bridge" network: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network"

Created on 12 Apr 2018  ·  4Comments  ·  Source: distribution/distribution

  • Ubuntu 17.10
  • docker-ce 18.04.0~ce~3-0~ubuntu

Despite what the error message states, there is more than a lot of private IPv6 space left for allocation.

1) With "ipv6": false in /etc/docker/daemon.json:

# more /etc/docker/daemon.json 
{
  "debug": true,
  "ipv6": false
}
# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-04-12 17:59:07 CEST; 4s ago
     Docs: https://docs.docker.com
 Main PID: 30159 (dockerd)
    Tasks: 28
   Memory: 72.1M
      CPU: 294ms
   CGroup: /system.slice/docker.service
           ├─30159 /usr/bin/dockerd -H fd://
           └─30183 docker-containerd --config /var/run/docker/containerd/containerd.toml

Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.989898650+02:00" level=debug msg="Registering GET, /distribution/{name:.*}/json"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.989942023+02:00" level=debug msg="Registering GET, /networks"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.989974638+02:00" level=debug msg="Registering GET, /networks/"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990002798+02:00" level=debug msg="Registering GET, /networks/{id:.+}"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990045135+02:00" level=debug msg="Registering POST, /networks/create"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990080443+02:00" level=debug msg="Registering POST, /networks/{id:.*}/connect"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990129081+02:00" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990179553+02:00" level=debug msg="Registering POST, /networks/prune"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990238906+02:00" level=debug msg="Registering DELETE, /networks/{id:.*}"
Apr 12 17:59:07 samsung-ubuntu dockerd[30159]: time="2018-04-12T17:59:07.990564251+02:00" level=info msg="API listen on /var/run/docker.sock"

2) With "ipv6": true in /etc/docker/daemon.json:

# more /etc/docker/daemon.json 
{
  "debug": true,
  "ipv6": true
}
# systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See "systemctl  status docker.service" and "journalctl  -xe" for details.
# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-04-12 18:04:07 CEST; 11s ago
     Docs: https://docs.docker.com
  Process: 4214 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 4214 (code=exited, status=1/FAILURE)
      CPU: 207ms

Apr 12 18:04:06 samsung-ubuntu systemd[1]: docker.service: Unit entered failed state.
Apr 12 18:04:06 samsung-ubuntu systemd[1]: docker.service: Failed with result 'exit-code'.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: Stopped Docker Application Container Engine.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: docker.service: Start request repeated too quickly.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: Failed to start Docker Application Container Engine.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: docker.service: Unit entered failed state.
Apr 12 18:04:07 samsung-ubuntu systemd[1]: docker.service: Failed with result 'exit-code'.
# journalctl  -xe | grep docker
...
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851298800+02:00" level=debug msg="Allocating IPv6 pools for network bridge (d99104233f728344ddea2082c93e18ef4f007843bd9f9d7f5ac63873a4d63444)"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851308891+02:00" level=debug msg="RequestPool(LocalDefault, , , map[], true)"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851325514+02:00" level=debug msg="releasing IPv4 pools from network bridge (d99104233f728344ddea2082c93e18ef4f007843bd9f9d7f5ac63873a4d63444)"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851337352+02:00" level=debug msg="ReleaseAddress(LocalDefault/172.22.0.0/16, 172.22.0.1)"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851349376+02:00" level=debug msg="Received set for ordinal 1, start 0, end 0, any false, release true, serial:false curr:0 \n"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851359070+02:00" level=debug msg="ReleasePool(LocalDefault/172.22.0.0/16)"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851376394+02:00" level=debug msg="daemon configured with a 15 seconds minimum shutdown timeout"
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.851388030+02:00" level=debug msg="start clean shutdown of all containers with a 15 seconds timeout..."
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.854603740+02:00" level=debug msg="Cleaning up old mountid : start."
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: time="2018-04-12T18:04:06.855030449+02:00" level=debug msg="Cleaning up old mountid : done."
Apr 12 18:04:06 samsung-ubuntu dockerd[4214]: Error starting daemon: Error initializing network controller: Error creating default "bridge" network: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network
Apr 12 18:04:06 samsung-ubuntu systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
invalid

All 4 comments

Similar problem for me, both on Ubuntu 16.04 LTS (AMD64) and on Raspbian (ARMv7, Raspberry Pi 3).

Tested with a freshly installed Docker version 18.04.0-ce, build 3d479c0 with no modification except a new file /etc/docker/daemon.json according to https://docs.docker.com/config/daemon/ipv6/

{
  "ipv6": true
}

Errors:

sudo service docker start
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since tor 2018-04-26 17:18:13 CEST; 43s ago
     Docs: https://docs.docker.com
  Process: 6042 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 6042 (code=exited, status=1/FAILURE)

apr 26 17:18:13 alexandre-VirtualBox systemd[1]: Failed to start Docker Application Container Engine.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: docker.service: Unit entered failed state.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: docker.service: Failed with result 'exit-code'.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: docker.service: Service hold-off time over, scheduling restart.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: Stopped Docker Application Container Engine.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: docker.service: Start request repeated too quickly.
apr 26 17:18:13 alexandre-VirtualBox systemd[1]: Failed to start Docker Application Container Engine.
apr 26 17:18:33 alexandre-VirtualBox systemd[1]: docker.service: Unit cannot be reloaded because it is inactive.
apr 26 17:18:47 alexandre-VirtualBox systemd[1]: docker.service: Start request repeated too quickly.
apr 26 17:18:47 alexandre-VirtualBox systemd[1]: Failed to start Docker Application Container Engine.

Closing since this is not a registry, but a moby issue.

Was this page helpful?
0 / 5 - 0 ratings