You are not logged in.

#1 2016-06-29 19:42:36

fusion809
Member
Registered: 2015-06-19
Posts: 70

[SOLVED] Docker daemon failure to network conflict

Hi,

I generally have found Arch Linux to be a very stable system, considering how bleeding-edge it is, but Docker (installed from the official Arch Linux community repo), specifically the Docker daemon has been giving me this error on startup (i.e., this is the output of systemctl status docker):

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-06-30 05:21:37 AEST; 1min 57s ago
     Docs: https://docs.docker.com
  Process: 923 ExecStart=/usr/bin/docker daemon -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 923 (code=exited, status=1/FAILURE)
    Tasks: 0 (limit: 512)
   Memory: 54.1M
   CGroup: /system.slice/docker.service

Jun 30 05:21:33 fusion809-pc docker[923]: time="2016-06-30T05:21:33.675693871+10:00" level=warning msg="devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored."
Jun 30 05:21:33 fusion809-pc docker[923]: time="2016-06-30T05:21:33.704968079+10:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Jun 30 05:21:34 fusion809-pc docker[923]: time="2016-06-30T05:21:34.595886267+10:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jun 30 05:21:34 fusion809-pc docker[923]: time="2016-06-30T05:21:34.802902289+10:00" level=info msg="Firewalld running: false"
Jun 30 05:21:35 fusion809-pc docker[923]: time="2016-06-30T05:21:35.291565827+10:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 30 05:21:37 fusion809-pc docker[923]: time="2016-06-30T05:21:37.600757783+10:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: cannot create network f15440f7a6fb0f6045f006aee334c91e6e4317b6ae23c2a4e29ecc800ba5e34a (docker0): conflicts with network 44b54e0be7a2145be67a03fa2f38aadc75d92a7ca76f18a2a0a9a59cb12d8388 (docker0): networks have same bridge name"
Jun 30 05:21:37 fusion809-pc systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 30 05:21:37 fusion809-pc systemd[1]: Failed to start Docker Application Container Engine.
Jun 30 05:21:37 fusion809-pc systemd[1]: docker.service: Unit entered failed state.
Jun 30 05:21:37 fusion809-pc systemd[1]: docker.service: Failed with result 'exit-code'.

I have run a Google Search for "network conflict docker" and the results I found (e.g., https://github.com/docker/machine/issues/1573, http://stackoverflow.com/questions/3125 … s-conflict, http://www.linuxjournal.com/content/con … etworking) seemed to apply to different situations where people were using docker-machine, boot2docker and non-Linux operating systems, namely Windows 7. I have looked at the documentation hoping to find something applicable to this but I can't seem to find it. For example, I tried starting the Docker daemon with:

sudo docker daemon -b 172.17.0.1/16

in the hope that a slightly different IP will rid myself of this conflict but it gave:

INFO[0000] previous instance of containerd still alive (9647) 
WARN[0000] devmapper: Usage of loopback devices is strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section. 
WARN[0000] devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored. 
INFO[0000] [graphdriver] using prior storage driver "devicemapper" 
INFO[0000] Graph migration to content-addressability took 0.00 seconds 
INFO[0000] Firewalld running: false                     
FATA[0001] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: bridge device with non default name 172.17.0.1/16 must be created manually

and I don't know how to create a bridge manually. I have pastebined my journalctl -xe output if that helps, here is the link.

EDIT: I have tried re-installing Docker, and I have also tried re-installing Docker and its related packages (like runc and containerd). Each time I re-install Docker I have also ran

systemctl daemon-reload

as root. My system is updated hourly using

pacman -Syu

, if you're wondering whether it's an outdated system issue.

Thanks for your time,
Brenton

Last edited by fusion809 (2016-06-29 20:34:16)

Offline

#2 2016-06-29 19:52:05

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Docker daemon failure to network conflict

Did you manually create a 'docker0' bridge? The error message seems to imply that a docker0 bridge already exists when you are starting the docker daemon. 'ip addr' without the daemon running should show your network interfaces. If there is a 'docker0' bridge, delete it, then try and start docker again.

Scott

Offline

#3 2016-06-29 20:02:26

fusion809
Member
Registered: 2015-06-19
Posts: 70

Re: [SOLVED] Docker daemon failure to network conflict

Good idea, but I deleted docker0 using (borrowed from http://unix.stackexchange.com/a/31765/27613):

sudo ip link set docker0 down
sudo brctl delbr docker0

and confirmed it was deleted with ip addr but when I ran:

sudo systemctl start docker

it failed again with more or less the same systemctl status docker output:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-06-30 05:59:57 AEST; 21s ago
     Docs: https://docs.docker.com
  Process: 13442 ExecStart=/usr/bin/docker daemon -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 13442 (code=exited, status=1/FAILURE)

Jun 30 05:59:56 fusion809-pc docker[13442]: time="2016-06-30T05:59:56.265737618+10:00" level=warning msg="devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored."
Jun 30 05:59:56 fusion809-pc docker[13442]: time="2016-06-30T05:59:56.286265987+10:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Jun 30 05:59:56 fusion809-pc docker[13442]: time="2016-06-30T05:59:56.419485171+10:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jun 30 05:59:56 fusion809-pc docker[13442]: time="2016-06-30T05:59:56.460336151+10:00" level=info msg="Firewalld running: false"
Jun 30 05:59:56 fusion809-pc docker[13442]: time="2016-06-30T05:59:56.643977764+10:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred
Jun 30 05:59:57 fusion809-pc docker[13442]: time="2016-06-30T05:59:57.020806193+10:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: cannot create n
Jun 30 05:59:57 fusion809-pc systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 30 05:59:57 fusion809-pc systemd[1]: Failed to start Docker Application Container Engine.
Jun 30 05:59:57 fusion809-pc systemd[1]: docker.service: Unit entered failed state.
Jun 30 05:59:57 fusion809-pc systemd[1]: docker.service: Failed with result 'exit-code'.

I looked at ip addr again and docker0 was back there it just had a different number next to it (4 instead of the original 3).

Last edited by fusion809 (2016-06-29 20:03:21)

Offline

#4 2016-06-29 20:12:24

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Docker daemon failure to network conflict

I see a message that says there's a previous instance of containerd still running. Make sure all docker, containerd and runc instances are not running. Then make sure that docker0 bridge is not there. Delete /var/lib/docker (assuming you don't have anything you need to save yet). Then try again.

Scott

Offline

#5 2016-06-29 20:17:22

fusion809
Member
Registered: 2015-06-19
Posts: 70

Re: [SOLVED] Docker daemon failure to network conflict

OK, using ps ax | grep containerd I got the ID of my running containerd process (which I terminated with sudo kill -9) and I also checked if runc was running with ps ax | grep runc and it wasn't. Then I ran ip addr and it gave:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether c4:34:6b:02:e8:55 brd ff:ff:ff:ff:ff:ff
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 54:27:1e:c4:b6:a5 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.11/24 brd 10.0.0.255 scope global wlo1
       valid_lft forever preferred_lft forever
    inet6 2001:8003:f11f:c600:5627:1eff:fec4:b6a5/64 scope global mngtmpaddr dynamic 
       valid_lft 1452sec preferred_lft 1452sec
    inet6 fe80::5627:1eff:fec4:b6a5/64 scope link 
       valid_lft forever preferred_lft forever
6: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:dd:8c:c0:ee brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.2/16 scope global docker0
       valid_lft forever preferred_lft forever

I do have a few docker containers I would rather not delete so if possible I'd rather not delete /var/lib/docker unless absolutely necessary. Do I now delete the docker0 bridge?

Offline

#6 2016-06-29 20:20:58

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Docker daemon failure to network conflict

Yes, as long as you have all the docker/containerd processes killed.

Offline

#7 2016-06-29 20:23:48

fusion809
Member
Registered: 2015-06-19
Posts: 70

Re: [SOLVED] Docker daemon failure to network conflict

Just did that and attempted to start the docker daemon and I got more or less the same error:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-06-30 06:21:56 AEST; 1min 7s ago
     Docs: https://docs.docker.com
  Process: 14910 ExecStart=/usr/bin/docker daemon -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 14910 (code=exited, status=1/FAILURE)
    Tasks: 0 (limit: 512)
   Memory: 22.6M
   CGroup: /system.slice/docker.service

Jun 30 06:21:55 fusion809-pc docker[14910]: time="2016-06-30T06:21:55.416760503+10:00" level=warning msg="devmapper: Base device already exists and has filesystem xfs on it. User specified filesystem  will be ignored."
Jun 30 06:21:55 fusion809-pc docker[14910]: time="2016-06-30T06:21:55.438188726+10:00" level=info msg="[graphdriver] using prior storage driver \"devicemapper\""
Jun 30 06:21:55 fusion809-pc docker[14910]: time="2016-06-30T06:21:55.614767126+10:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Jun 30 06:21:55 fusion809-pc docker[14910]: time="2016-06-30T06:21:55.659107544+10:00" level=info msg="Firewalld running: false"
Jun 30 06:21:56 fusion809-pc docker[14910]: time="2016-06-30T06:21:56.016473839+10:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Jun 30 06:21:56 fusion809-pc docker[14910]: time="2016-06-30T06:21:56.423812361+10:00" level=fatal msg="Error starting daemon: Error initializing network controller: Error creating default \"bridge\" network: cannot create network 7ed7cb62f1c9137269ef6925743e277ac520bfc3426815fe2b6907ceb4d4fa37 (docker0): conflicts with network 44b54e0be7a2145be67a03fa2f38aadc75d92a7ca76f18a2a0a9a59cb12d8388 (docker0): networks have same bridge name"
Jun 30 06:21:56 fusion809-pc systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 30 06:21:56 fusion809-pc systemd[1]: Failed to start Docker Application Container Engine.
Jun 30 06:21:56 fusion809-pc systemd[1]: docker.service: Unit entered failed state.
Jun 30 06:21:56 fusion809-pc systemd[1]: docker.service: Failed with result 'exit-code'.

Offline

#8 2016-06-29 20:32:51

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Docker daemon failure to network conflict

Try 'rm -rf /var/lib/docker/network' and then start docker.  Reference.

Last edited by firecat53 (2016-06-29 20:33:41)

Offline

#9 2016-06-29 20:33:53

fusion809
Member
Registered: 2015-06-19
Posts: 70

Re: [SOLVED] Docker daemon failure to network conflict

Worked like a charm, thanks a million!

Offline

#10 2017-06-09 07:37:30

h.safe
Member
Registered: 2016-08-01
Posts: 31

Re: [SOLVED] Docker daemon failure to network conflict

Hi there,

I came across this thread and thought will add something that was my problem the other day. I hope it can be useful. In my case the thing got entangled with the default subnet setting and only after a servers subnet conflicted with the 172.16.0.0/16 bridge0. I managed to remove the bridge0 add a vbr1 with shortened range i.e 172.16.122.0/24 and get going at the time of my experience with a docker image. However a reboot failed to get the service run and passing time made the things even worse. Trying to delete everything and rebuild from scratch did not again help and still the systemd script failed to start it ...
Eventually the culprit in my case was the json config (/etc/docker/daemon.json) referring to the earlier and default bridge and not my new bridge. modifying the one-line code and referring the bridge to the right name solved my issue
Hope it helps people like me...:)


Why did Bodhidharma come from the west?

Offline

Board footer

Powered by FluxBB