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

Phantom docker network #1743

Closed
h6w opened this issue May 3, 2017 · 40 comments · Fixed by moby/moby#39633
Closed

Phantom docker network #1743

h6w opened this issue May 3, 2017 · 40 comments · Fixed by moby/moby#39633

Comments

@h6w
Copy link

h6w commented May 3, 2017

I've created a docker network with a -o parent= option, and then removed it and rebooted the machine, and now I cannot add the network back. Instead I get the error:

Error response from daemon: network dm-68eba91a51dd is already using parent interface dock_br

I checked to make sure that the network was not listed in the docker networks:

$ docker network list
NETWORK ID          NAME                DRIVER              SCOPE
05e0883e847d        bridge              bridge              local
ae994acdf4df        host                host                local
c5389bbc6e14        none                null                local

I tried again removing the non-existent docker network:

$ docker network rm docker_int_net
Error response from daemon: network docker_int_net not found
$ docker network prune
WARNING! This will remove all networks not used by at least one container.
Are you sure you want to continue? [y/N] y
$

And I tried again:

$ docker network create -d macvlan     --subnet=192.168.0.0/16     --gateway=192.168.40.252      -o 
parent=dock_br docker_int_net
Error response from daemon: network dm-68eba91a51dd is already using parent interface dock_br

How could a network exist in the network test but not be listed in the network list? How do I reset it?

@aboch
Copy link
Contributor

aboch commented May 3, 2017

Do you see any relevant warning/error logs in your daemon logs ?

@h6w
Copy link
Author

h6w commented May 4, 2017

@aboch Nothing particularly enlightening:

May 03 16:54:00 officedocker2 systemd[1]: Started Docker Application Container Engine.
May 03 16:54:00 officedocker2 dockerd[2498]: time="2017-05-03T16:54:00.283026375+10:00" level=info msg="API listen on /var/run/docker.sock"
May 03 16:56:30 officedocker2 dockerd[2498]: time="2017-05-03T16:56:30.650509633+10:00" level=error msg="Handler for POST /v1.28/networks/create returned error: network dm-68eba91a51dd is already using parent interface dock_br"

@h6w
Copy link
Author

h6w commented May 4, 2017

@aboch Not much more useful with debug enabled, either:

May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.435262914+10:00" level=info msg="Got signal to reload configuration, reloading from: /etc/docker/daemon.json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.444517617+10:00" level=debug msg="Registering routers"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.444560755+10:00" level=debug msg="Registering GET, /containers/{name:.*}/checkpoints"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.444828776+10:00" level=debug msg="Registering POST, /containers/{name:.*}/checkpoints"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445017724+10:00" level=debug msg="Registering DELETE, /containers/{name}/checkpoints/{checkpoint}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445256485+10:00" level=debug msg="Registering HEAD, /containers/{name:.*}/archive"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445407886+10:00" level=debug msg="Registering GET, /containers/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445520801+10:00" level=debug msg="Registering GET, /containers/{name:.*}/export"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445668178+10:00" level=debug msg="Registering GET, /containers/{name:.*}/changes"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445813384+10:00" level=debug msg="Registering GET, /containers/{name:.*}/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.445946128+10:00" level=debug msg="Registering GET, /containers/{name:.*}/top"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446083119+10:00" level=debug msg="Registering GET, /containers/{name:.*}/logs"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446271044+10:00" level=debug msg="Registering GET, /containers/{name:.*}/stats"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446410274+10:00" level=debug msg="Registering GET, /containers/{name:.*}/attach/ws"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446553784+10:00" level=debug msg="Registering GET, /exec/{id:.*}/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446686074+10:00" level=debug msg="Registering GET, /containers/{name:.*}/archive"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446825540+10:00" level=debug msg="Registering POST, /containers/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.446931353+10:00" level=debug msg="Registering POST, /containers/{name:.*}/kill"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447086830+10:00" level=debug msg="Registering POST, /containers/{name:.*}/pause"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447250833+10:00" level=debug msg="Registering POST, /containers/{name:.*}/unpause"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447404926+10:00" level=debug msg="Registering POST, /containers/{name:.*}/restart"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447540620+10:00" level=debug msg="Registering POST, /containers/{name:.*}/start"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447695348+10:00" level=debug msg="Registering POST, /containers/{name:.*}/stop"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447822707+10:00" level=debug msg="Registering POST, /containers/{name:.*}/wait"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.447959863+10:00" level=debug msg="Registering POST, /containers/{name:.*}/resize"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448105286+10:00" level=debug msg="Registering POST, /containers/{name:.*}/attach"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448246902+10:00" level=debug msg="Registering POST, /containers/{name:.*}/copy"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448385932+10:00" level=debug msg="Registering POST, /containers/{name:.*}/exec"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448527334+10:00" level=debug msg="Registering POST, /exec/{name:.*}/start"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448652189+10:00" level=debug msg="Registering POST, /exec/{name:.*}/resize"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448780770+10:00" level=debug msg="Registering POST, /containers/{name:.*}/rename"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.448924750+10:00" level=debug msg="Registering POST, /containers/{name:.*}/update"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449067514+10:00" level=debug msg="Registering POST, /containers/prune"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449164207+10:00" level=debug msg="Registering PUT, /containers/{name:.*}/archive"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449317796+10:00" level=debug msg="Registering DELETE, /containers/{name:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449454237+10:00" level=debug msg="Registering GET, /images/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449551305+10:00" level=debug msg="Registering GET, /images/search"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449653777+10:00" level=debug msg="Registering GET, /images/get"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449745385+10:00" level=debug msg="Registering GET, /images/{name:.*}/get"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.449888365+10:00" level=debug msg="Registering GET, /images/{name:.*}/history"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450013472+10:00" level=debug msg="Registering GET, /images/{name:.*}/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450186050+10:00" level=debug msg="Registering POST, /commit"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450265982+10:00" level=debug msg="Registering POST, /images/load"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450350172+10:00" level=debug msg="Registering POST, /images/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450446427+10:00" level=debug msg="Registering POST, /images/{name:.*}/push"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450572779+10:00" level=debug msg="Registering POST, /images/{name:.*}/tag"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450696491+10:00" level=debug msg="Registering POST, /images/prune"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450779338+10:00" level=debug msg="Registering DELETE, /images/{name:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450894544+10:00" level=debug msg="Registering OPTIONS, /{anyroute:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.450999466+10:00" level=debug msg="Registering GET, /_ping"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451076854+10:00" level=debug msg="Registering GET, /events"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451173787+10:00" level=debug msg="Registering GET, /info"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451268505+10:00" level=debug msg="Registering GET, /version"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451342256+10:00" level=debug msg="Registering GET, /system/df"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451421184+10:00" level=debug msg="Registering POST, /auth"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451487972+10:00" level=debug msg="Registering GET, /volumes"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451577156+10:00" level=debug msg="Registering GET, /volumes/{name:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451716579+10:00" level=debug msg="Registering POST, /volumes/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451817595+10:00" level=debug msg="Registering POST, /volumes/prune"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.451908901+10:00" level=debug msg="Registering DELETE, /volumes/{name:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452032337+10:00" level=debug msg="Registering POST, /build"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452112204+10:00" level=debug msg="Registering POST, /swarm/init"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452202074+10:00" level=debug msg="Registering POST, /swarm/join"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452285679+10:00" level=debug msg="Registering POST, /swarm/leave"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452368954+10:00" level=debug msg="Registering GET, /swarm"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452435753+10:00" level=debug msg="Registering GET, /swarm/unlockkey"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452534628+10:00" level=debug msg="Registering POST, /swarm/update"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452629864+10:00" level=debug msg="Registering POST, /swarm/unlock"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452719560+10:00" level=debug msg="Registering GET, /services"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452802656+10:00" level=debug msg="Registering GET, /services/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.452927890+10:00" level=debug msg="Registering POST, /services/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453028881+10:00" level=debug msg="Registering POST, /services/{id}/update"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453164540+10:00" level=debug msg="Registering DELETE, /services/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453289490+10:00" level=debug msg="Registering GET, /services/{id}/logs"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453437680+10:00" level=debug msg="Registering GET, /nodes"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453511244+10:00" level=debug msg="Registering GET, /nodes/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453629962+10:00" level=debug msg="Registering DELETE, /nodes/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453759516+10:00" level=debug msg="Registering POST, /nodes/{id}/update"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453911125+10:00" level=debug msg="Registering GET, /tasks"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.453983330+10:00" level=debug msg="Registering GET, /tasks/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454112301+10:00" level=debug msg="Registering GET, /secrets"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454199959+10:00" level=debug msg="Registering POST, /secrets/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454301551+10:00" level=debug msg="Registering DELETE, /secrets/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454431591+10:00" level=debug msg="Registering GET, /secrets/{id}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454560978+10:00" level=debug msg="Registering POST, /secrets/{id}/update"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454700292+10:00" level=debug msg="Registering GET, /plugins"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454779208+10:00" level=debug msg="Registering GET, /plugins/{name:.*}/json"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.454906786+10:00" level=debug msg="Registering GET, /plugins/privileges"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455007272+10:00" level=debug msg="Registering DELETE, /plugins/{name:.*}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455141769+10:00" level=debug msg="Registering POST, /plugins/{name:.*}/enable"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455273948+10:00" level=debug msg="Registering POST, /plugins/{name:.*}/disable"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455400707+10:00" level=debug msg="Registering POST, /plugins/pull"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455494119+10:00" level=debug msg="Registering POST, /plugins/{name:.*}/push"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455620490+10:00" level=debug msg="Registering POST, /plugins/{name:.*}/upgrade"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455757078+10:00" level=debug msg="Registering POST, /plugins/{name:.*}/set"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455883839+10:00" level=debug msg="Registering POST, /plugins/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.455976059+10:00" level=debug msg="Registering GET, /networks"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456061214+10:00" level=debug msg="Registering GET, /networks/"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456169766+10:00" level=debug msg="Registering GET, /networks/{id:.+}"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456291513+10:00" level=debug msg="Registering POST, /networks/create"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456394549+10:00" level=debug msg="Registering POST, /networks/{id:.*}/connect"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456523734+10:00" level=debug msg="Registering POST, /networks/{id:.*}/disconnect"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456659400+10:00" level=debug msg="Registering POST, /networks/prune"
May 04 11:03:50 officedocker2 dockerd[2498]: time="2017-05-04T11:03:50.456760515+10:00" level=debug msg="Registering DELETE, /networks/{id:.*}"
May 04 11:05:01 officedocker2 dockerd[2498]: time="2017-05-04T11:05:01.880867111+10:00" level=debug msg="Calling GET /_ping"
May 04 11:05:01 officedocker2 dockerd[2498]: time="2017-05-04T11:05:01.882153218+10:00" level=debug msg="Calling DELETE /v1.28/networks/docker_int_net"
May 04 11:05:01 officedocker2 dockerd[2498]: time="2017-05-04T11:05:01.882683958+10:00" level=error msg="Handler for DELETE /v1.28/networks/docker_int_net returned error: network docker_int_net not found"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.919671013+10:00" level=debug msg="Calling GET /_ping"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.920681732+10:00" level=debug msg="Calling POST /v1.28/networks/create"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.920871584+10:00" level=debug msg="form data: {\"Attachable\":false,\"CheckDuplicate\":true,\"Driver\":\"macvlan\",\"EnableIPv6\":false,\"IPAM\":{\"Config\":[{\"Gateway\":\"192.168.40.252\",\"Subnet\":\"192.168.0.0/16\"}],\"Driver\":\"default\",\"Options\":{}},\"Internal\":false,\"Labels\":{},\"Name\":\"docker_int_net\",\"Options\":{\"parent\":\"dock_br\"}}"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921384754+10:00" level=debug msg="Allocating IPv4 pools for network docker_int_net (4e25c3afdc6372874ebef9b903e1f0b73cbb7968c00d6337f3544ba0442eb2dd)"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921415874+10:00" level=debug msg="RequestPool(LocalDefault, 192.168.0.0/16, , map[], false)"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921467101+10:00" level=debug msg="RequestAddress(LocalDefault/192.168.0.0/16, 192.168.40.252, map[RequestAddressType:com.docker.network.gateway])"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921548426+10:00" level=debug msg="releasing IPv4 pools from network docker_int_net (4e25c3afdc6372874ebef9b903e1f0b73cbb7968c00d6337f3544ba0442eb2dd)"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921568191+10:00" level=debug msg="ReleaseAddress(LocalDefault/192.168.0.0/16, 192.168.40.252)"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921588591+10:00" level=debug msg="ReleasePool(LocalDefault/192.168.0.0/16)"
May 04 11:05:08 officedocker2 dockerd[2498]: time="2017-05-04T11:05:08.921641794+10:00" level=error msg="Handler for POST /v1.28/networks/create returned error: network dm-68eba91a51dd is already using parent interface dock_br"

@aboch
Copy link
Contributor

aboch commented May 4, 2017

I was referring to the logs when you remove the first macvlan network, if you can reproduce the issue.

If this issue is blocking you, you need to remove the var/lib/docker/network/files/local-kv.db file and restart docker, to fix it (Be aware you will lose your current networks).

@h6w
Copy link
Author

h6w commented May 4, 2017

Yeah, I think what you mean is in the second log:

May 04 11:05:01 officedocker2 dockerd[2498]: time="2017-05-04T11:05:01.882683958+10:00" level=error msg="Handler for DELETE /v1.28/networks/docker_int_net returned error: network docker_int_net not found"

Unfortunately, I can't seem to remove the network it's referring to. I think your other solution may be the only option.

@aboch
Copy link
Contributor

aboch commented May 4, 2017

I am referring to the first time the delete of the network docker_int_net was done.
At that time, the network was removed but some other cleanup failed.
This is why the macvlan driver still thinks there is somebody using that parent interface.

@h6w
Copy link
Author

h6w commented May 4, 2017

Thanks. docker_int_net was removed and created quite a few times. It was awhile ago now that it failed. I'll report back with debugs if/when I see it happen again.

@sashgorokhov
Copy link

sashgorokhov commented May 12, 2017

Having the same issue. I have a virtual interface, created by kvm, and a macvlan network created by compose with that interface VLAN.10 as its parent:

  mgmt_net:
    driver: macvlan
    driver_opts:
      parent: mgmt_net.10

Last week i having that issue while trying to docker-compose up my project.

ERROR: network dm-c3cd78b9805c is already using parent interface mgmt_net.10

But, removing the VLAN tag from parent interface, fixes the issue, but my project cant work with that network configuration.

Docker version 1.12.6, build 78d1802

Removing /var/lib/docker/network/files/local-kv.db and restarting docker fixed the issue.

@h6w
Copy link
Author

h6w commented May 12, 2017

@sashgorokhov I was not using VLAN tagging in my environment.

@andrei91ro
Copy link

andrei91ro commented Sep 29, 2017

Unfortunately I'm encountering the same issue on Docker 17.07.0-ce, build 87847530f7 using the macvlan network that is linked to a TAP VPN (openvpn).

The log files only mention:
sep 29 22:09:45 Laptop dockerd[7240]: time="2017-09-29T22:09:45.484214747+03:00" level=warning msg="Could not create macvlan network for id 1e1e7385397fd726fcea6dd183690f

The original docker network was created using:

docker network create -d macvlan \
    --subnet=10.8.0.0/24 \
    -o parent=tap0 vpn_tunnel

This error started appearing after restarting the system (using systemd) while the docker network was fully configured and in use.

The solution suggested by aboch, of removing var/lib/docker/network/files/local-kv.db does not work and neither does docker network prune.

My solution is to start docker before openvpn so that it will complain that it could not create the network

sep 29 22:18:54 Laptop dockerd[8341]: time="2017-09-29T22:18:54.476120043+03:00" level=warning msg="Could not create macvlan network for id 1e1e7385397fd726fcea6dd183690f
sep 29 22:18:54 Laptop dockerd[8341]: time="2017-09-29T22:18:54.476177163+03:00" level=warning msg="Could not create macvlan network for id da157fa778e8083fbe187e47c6a7b1

but when I issue the docker network create command above, all things go well.

@eyz
Copy link

eyz commented Jan 24, 2018

This sounds a lot like a bug that I've squashed in my docker-ce fork, which had plagued me since first experimenting with ipvlan in global/swarm-scoped mode ~ docker-ce 17.06. The only semi-official workaround (from @mavenugo at Docker) was to nuke the libnetwork kv store file, so I went a bit deeper and found that cleanup is not occurring at or around shutdown, and so I decided to try cleanup of duplicates at creation time instead.

My PR #2055 may be a good starting point for an officlal fix. The related issue I opened is #2056 (cleanup duplicate ipvlan and macvlan network IDs during createNetwork)

It may not be the perfect fix, but it resolved this issue in my case -- I'm using ipvlan, but I suspect its the same issue with macvlan -

docker.err.log:time="2018-01-15T23:32:21.993891743Z" level=error msg="fatal task error" error="network di-hwqzu5i4kmrd is already using parent interface eth0

@softcombiz
Copy link

@eyz yes, your PR fix this problem for me.

@naanuswaroop
Copy link

naanuswaroop commented May 29, 2018

We are facing the same issue.
The following errors are observed after container hosting VM crashes and comes up again:
network dm-ngqttz267j70 is already using parent interface sample_net.327
msg="failed to deactivate service binding for container web.1.g5davu5b9vz1jtgh0dv1z58yv" error="No such container: web.1.g5davu5b9vz1jtgh0dv1z58yv"
msg="network sample_net remove failed: network sample_net not found"

When is the fix planned?
Are there any workarounds?

EDIT 1:
We found a workaround. Deletion of "/var/lib/docker/network/files/local-kv.db" and restarting docker seems to work. This is mentioned in moby/moby#17669 . We are in the process of testing this in CI. Please let us know if there are any side-effects of this work-around.

EDIT 2:
Update:

The above mentioned workaround of deleting "/var/lib/docker/network/files/local-kv.db" file and restarting docker has been tested for more than a fortnight now and we are not facing the original issue anymore. So, anyone facing this issue can probably use this workaround. This probably is a genuine issue in docker and needs to be fixed.

@dobe
Copy link

dobe commented Aug 28, 2018

experiencing the same issue on docker 18.06

@rnataraja
Copy link

@mavenugo @fcrisciani What is your opinion on the following diff. Gist with some comments in here.
This is based of 17.09 version.

https://gist.github.com/rnataraja/d987b61d8acc8ac738641f55ebe5af0d

@softcombiz
Copy link

@rnataraja thx!

@itsgk92
Copy link

itsgk92 commented Feb 4, 2019

+1

@sanga
Copy link

sanga commented Mar 28, 2019

still hitting this on Docker version 18.09.4, build d14af54266 and yes the aforementioned work-around of deleting /var/lib/docker/network/files/local-kv.db fixes (works-around) the problem

@Greatsamps
Copy link

still here in 18.09.5

@lukicsl
Copy link

lukicsl commented Apr 14, 2019

+1

2 similar comments
@branzo
Copy link

branzo commented Apr 29, 2019

+1

@teadur
Copy link

teadur commented Jun 9, 2019

+1

arkodg pushed a commit to arkodg/libnetwork that referenced this issue Jul 15, 2019
This commit carries forward the work done in
moby#2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: moby#1743

Signed-off-by: Arko Dasgupta <[email protected]>
arkodg pushed a commit to arkodg/libnetwork that referenced this issue Aug 15, 2019
This commit carries forward the work done in
moby#2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: moby#1743

Signed-off-by: Arko Dasgupta <[email protected]>
arkodg pushed a commit to arkodg/libnetwork that referenced this issue Aug 15, 2019
This commit carries forward the work done in
moby#2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: moby#1743

Signed-off-by: Arko Dasgupta <[email protected]>
thaJeztah added a commit to thaJeztah/docker that referenced this issue Sep 16, 2019
full diff: moby/libnetwork@83d30db...09cdcc8

changes included:

- moby/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- moby/libnetwork#2411 Macvlan network handles netlabel.Internal wrong
  - fixes moby/libnetwork#2410 Macvlan network handles netlabel.Internal wrong
- moby/libnetwork#2414 Allow network with --config-from to be --internal
  - fixes moby/libnetwork#2413 Network with --config-from does not honor --internal
- moby/libnetwork#2351 Use fewer modprobes
  - relates to moby#38930 Use fewer modprobes
- moby/libnetwork#2415 Support dockerd and system restarts for ipvlan and macvlan networks
  - carry of moby/libnetwork#2295 phantom ip/mac vlan network after a powercycle
  - fixes moby/libnetwork#1743 Phantom docker network

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 6f234db)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this issue Sep 17, 2019
full diff: moby/libnetwork@83d30db...09cdcc8

changes included:

- moby/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- moby/libnetwork#2411 Macvlan network handles netlabel.Internal wrong
  - fixes moby/libnetwork#2410 Macvlan network handles netlabel.Internal wrong
- moby/libnetwork#2414 Allow network with --config-from to be --internal
  - fixes moby/libnetwork#2413 Network with --config-from does not honor --internal
- moby/libnetwork#2351 Use fewer modprobes
  - relates to moby/moby#38930 Use fewer modprobes
- moby/libnetwork#2415 Support dockerd and system restarts for ipvlan and macvlan networks
  - carry of moby/libnetwork#2295 phantom ip/mac vlan network after a powercycle
  - fixes moby/libnetwork#1743 Phantom docker network

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 6f234db9fef23c591d8376f96db062e7107b658f)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: b6190c2713623ab455d29da4771b684e4eafc63f
Component: engine
@hz0ne
Copy link

hz0ne commented Oct 7, 2019

well, same issue happen on 18.03.1-ce,power pc,I deleted the /var/lib/docker/network/files/local-kv.db and restart host,the net work config of macvlan still in use!so,check the root dir of docker daemon,I find it ,thanks!

@h6w
Copy link
Author

h6w commented Oct 7, 2019

@dhxsy1994 Yes, but what version of docker are you running? The fix was only released a few days ago, so you'd have to be using a very cutting-edge release for it to be fixed for you.

@hz0ne
Copy link

hz0ne commented Oct 7, 2019

@dhxsy1994 Yes, but what version of docker are you running? The fix was only released a few days ago, so you'd have to be using a very cutting-edge release for it to be fixed for you.

Thanks for reply,due to the IBM doing support for the power pc architecture,the docker for power
pc latest version is 18.03.1-ce,so we just resolved it by this resolution, thanks again.

@h6w
Copy link
Author

h6w commented Oct 7, 2019

@dhxsy1994 You're still well behind. You need to download and compile the latest version of Docker to get this. It's in version 19.03.

@hz0ne
Copy link

hz0ne commented Oct 7, 2019

@dhxsy1994 You're still well behind. You need to download and compile the latest version of Docker to get this. It's in version 19.03.

ok!I will do it in a Non-production environment, do some tests and change the version of docker.

burnMyDread pushed a commit to burnMyDread/moby that referenced this issue Oct 21, 2019
full diff: moby/libnetwork@83d30db...09cdcc8

changes included:

- moby/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- moby/libnetwork#2411 Macvlan network handles netlabel.Internal wrong
  - fixes moby/libnetwork#2410 Macvlan network handles netlabel.Internal wrong
- moby/libnetwork#2414 Allow network with --config-from to be --internal
  - fixes moby/libnetwork#2413 Network with --config-from does not honor --internal
- moby/libnetwork#2351 Use fewer modprobes
  - relates to moby#38930 Use fewer modprobes
- moby/libnetwork#2415 Support dockerd and system restarts for ipvlan and macvlan networks
  - carry of moby/libnetwork#2295 phantom ip/mac vlan network after a powercycle
  - fixes moby/libnetwork#1743 Phantom docker network

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: zach <[email protected]>
@sanga
Copy link

sanga commented Mar 3, 2020

I just got this again in docker v Docker version 19.03.6, build 369ce74a3c

@lkytal
Copy link

lkytal commented Mar 5, 2020

This happens again in Docker version 19.03.2, build 6a30dfca03

@arkodg
Copy link
Contributor

arkodg commented Mar 5, 2020

@sanga @lkytal can you please share the cmd to reproduce this issue
I'm on version19.03.7 and I don't see the issue if I restart docker after creating a macvlan network with the following commands

docker network create -d macvlan -o parent=eth0 testNet
docker run --net=testNet -d nginx
ps -aux | grep dockerd
kill -9 3905
dockerd &
docker network rm testNet
docker network create -d macvlan -o parent=eth0 testNet

@kandrews2006
Copy link

Just came across this thread. Also happening to me in Docker version 19.03.5, build 633a0ea

I deleted /var/lib/docker/network/files/local-kv.db after taking backup of it and rebooted the docker host. After reboot docker started properly and the macvlan network was able to get created and operate normally.

@voje
Copy link

voje commented Nov 20, 2020

Came across this with docker version 19.03.12, build 48a66213fe

How robust is deleting /var/lib/docker/network/files/local-kv.db and restarting docker?
There are other docker networks on the machine that I don't want to lose.

Trying to reproduce.

@vercas
Copy link

vercas commented Jan 15, 2021

Having the same issue right now.

@ZacharyACoon
Copy link

Same jazz for me.

root@aspen:/opt/docker/scripts# docker version
Client: Docker Engine - Community
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        2291f61
 Built:             Mon Dec 28 16:17:34 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       8891c58
  Built:            Mon Dec 28 16:15:28 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.3
  GitCommit:        269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc:
  Version:          1.0.0-rc92
  GitCommit:        ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

root@aspen:/opt/docker/scripts# docker network prune
WARNING! This will remove all custom networks not used by at least one container.
Are you sure you want to continue? [y/N] y
root@aspen:/opt/docker/scripts# bash r
reconfigure_networks.sh        rm_dangling_docker_volumes.sh  
root@aspen:/opt/docker/scripts# bash reconfigure_networks.sh
Error response from daemon: network dm-06a179039d63 is already using parent interface uplink.100
Error response from daemon: network dm-6c11b022d28e is already using parent interface uplink.101
Error response from daemon: network dm-5d88c1900c2e is already using parent interface uplink.104
Error response from daemon: network dm-dbca125ccbef is already using parent interface uplink.105
root@aspen:/opt/docker/scripts# docker network ls
NETWORK ID     NAME            DRIVER    SCOPE
8eafb2809bae   bridge          bridge    local
d469899401a4   gitea_backend   bridge    local
0e3f94ba56e2   host            host      local
3819a81ada55   none            null      local

cpuguy83 pushed a commit to cpuguy83/docker that referenced this issue May 25, 2021
This commit carries forward the work done in
moby/libnetwork#2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: moby/libnetwork#1743

Signed-off-by: Arko Dasgupta <[email protected]>
@Nikhiladiga
Copy link

Came across this with docker version 19.03.12, build 48a66213fe

How robust is deleting /var/lib/docker/network/files/local-kv.db and restarting docker? There are other docker networks on the machine that I don't want to lose.

Trying to reproduce.

Deleting that file will also delete other bridge networks which you have created. Be careful while deleting it. Take a backup of the file.

@skavadias
Copy link

I also had this issue, after an abnormal shutdown, with
Docker version 20.10.7, build 20.10.7-0ubuntu5~20.04.2

@webash
Copy link

webash commented Nov 11, 2022

I'm also experiencing this in 20.10.21 :(

ashley@agnh-core2-2:~$ sudo ip addr show dev br-5qwgbaqz7jx5
6: br-5qwgbaqz7jx5: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:8a:4c:7f:82 brd ff:ff:ff:ff:ff:ff
    inet 10.22.66.1/24 brd 10.22.66.255 scope global br-5qwgbaqz7jx5
       valid_lft forever preferred_lft forever
ashley@agnh-core2-2:~$ sudo journalctl -u docker.service | grep br-5qwgbaqz7jx5
Nov 11 00:45:16 agnh-core2-2 dockerd[1148]: time="2022-11-11T00:45:16.475400472Z" level=error msg="fatal task error" error="cannot create network tdx3r87okfoqk5lgy53xmo8ez (br-tdx3r87okfoq): conflicts with network 5qwgbaqz7jx53n2mz3s5d736a (br-5qwgbaqz7jx5): networks have overlapping IPv4" module=node/agent/taskmanager node.id=sweil7ch17zpiovvq1ltimnek service.id= task.id=7o547ibe0c7kfkx3y0681kpla
Nov 11 00:46:53 agnh-core2-2 dockerd[1148]: time="2022-11-11T00:46:53.195640083Z" level=error msg="fatal task error" error="cannot create network v5tlvmdut77xasrao1m31e5se (br-v5tlvmdut77x): conflicts with network 5qwgbaqz7jx53n2mz3s5d736a (br-5qwgbaqz7jx5): networks have overlapping IPv4" module=node/agent/taskmanager node.id=sweil7ch17zpiovvq1ltimnek service.id= task.id=q1e47bf9guruf1aaykt45iyt6
ashley@agnh-core2-2:~$ docker network rm 5qwgbaqz7jx53n2mz3s5d736a
Error: No such network: 5qwgbaqz7jx53n2mz3s5d736a
ashley@agnh-core2-2:~$ docker --version
Docker version 20.10.21, build baeda1f
ashley@agnh-core2-2:~$

As mentioned here moby/moby#35101 (comment)

@RicardoM17
Copy link

RicardoM17 commented May 23, 2023

Also experiencing this issue:

docker version
Client: Docker Engine - Community
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.16.9
 Git commit:        dea9396
 Built:             Thu Nov 18 00:35:52 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.11
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       847da18
  Built:            Thu Nov 18 00:34:25 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Deleting /var/lib/docker/network/files/local-kv.db and restarting docker fixes this but this still requires a manual intervention and as such isn't really stable for a production environment.

Also mentioned this in moby/moby#35101 (comment)

@SickProdigy
Copy link

SickProdigy commented Nov 12, 2023

In my search to figure out about this phantom networking issue this was one of the only things to come up.

Using: Docker version 24.0.7, build afdd53b

My eth name updates every so often in debian 11. Caused an issue with adguard docker container not to start since specifically called for in macvlan. Well I guess on a restart it didn't close properly, or I didn't restart properly 1. (restarting debian properly is almost impossible at this point) caused a phantom network to lag around. Couldn't be found with 'docker network ls' couldn't force rm either. Couldn't be found.

Deleting /var/lib/docker/network/files/local-kv.db and restarting docker fixed it. Will have to recreate networks. Make sure to take note/backup ranges if you have any specifics. ipv4/ipv6. Restarting docker can cause issues with containers returning. So if you have a lot of containers may have to start them back up also. Maybe I could have restarted PC, but that would mean more downtime.

Hope this helps someone else in their searchings.

My original error:
failed to deploy a stack: Network somenetworkname Creating Network somenetworkname Error failed to create network somenetworkname: Error response from daemon: network dm-c06390235e00 is already using parent interface enp3s0

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

Successfully merging a pull request may close this issue.