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 response from daemon: configuration network 8-2 is in use #35101

Closed
daledude opened this issue Oct 5, 2017 · 29 comments · Fixed by #39295
Closed

Error response from daemon: configuration network 8-2 is in use #35101

daledude opened this issue Oct 5, 2017 · 29 comments · Fixed by #39295
Labels
area/networking area/swarm kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/confirmed version/17.09

Comments

@daledude
Copy link

daledude commented Oct 5, 2017

Description

It seems when an IPAM driver fails and the container is removed the network that used the IPAM driver becomes stuck and can no longer be removed. rm -rf /var/lib/docker is necessary (unless some way to edit the .db file?).

Steps to reproduce the issue:

  1. docker network create -d macvlan --subnet 8.2.250.0/24 --gateway 8.2.250.3 -o parent=public --ipam-driver arp-ipam3 --config-only 8-2
  2. docker network create -d macvlan --scope swarm --config-from 8-2 --attachable public-8-2
  3. docker service create ... --network public-8-2 ... my-service
  4. ipam driver crashes during RequestAddress.
  5. service create is in pending state for a long time.
  6. CTRL-C
  7. docker service rm my-service. Succeeds.
  8. docker network rm public-8-2. Succeeds but errors in logs that network doesn't exist?
  9. docker network rm 8-2. This produces the titled error. Only way to remove network now is to rm -rf /var/lib/docker/

Describe the results you received:
Cannot remove network.

Describe the results you expected:
Network should be removed.

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

Output of docker version:

Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:18 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:40:56 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 17.09.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: vz74i89jega7k0ccyekpplgwq
 Is Manager: true
 ClusterID: qrpx9z4664ts79a6eamvrrxnw
 Managers: 1
 Nodes: 2
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 10.0.21.39
 Manager Addresses:
  10.0.21.39:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.11.0-14-generic
Operating System: Ubuntu 16.04.3 LTS
OSType: linux
Architecture: x86_64
CPUs: 40
Total Memory: 141.6GiB
Name: container1
ID: IMGD:TF6D:E4FH:AT2H:SZ5C:YNIU:IB57:ATV7:Y6KU:JBIG:Z5PF:ZBMF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.):

Logs:

level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.RequestAddress: Post http://8.2.250.40:8181/IpamDriver.RequestAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 2s"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.RequestAddress: Post http://8.2.250.40:8181/IpamDriver.RequestAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 4s"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.RequestAddress: Post http://8.2.250.40:8181/IpamDriver.RequestAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 8s"
level=info msg="Node join event for container2-ba0d08b08afe/10.0.21.40"
level=error msg="fatal task error" error="starting container failed: Post http://8.2.250.40:8181/IpamDriver.RequestAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused" module="node/agent/taskmanager" node.id=vz74i89jega7k0ccyekpplgwq service.id=scogq490jtph6f5ahigrmvxl7 task.id=f97hf1oyokft44dbusddw3os1
level=warning msg="underweighting node vz74i89jega7k0ccyekpplgwq for service scogq490jtph6f5ahigrmvxl7 because it experienced 5 failures or rejections within 5m0s" module=node node.id=vz74i89jega7k0ccyekpplgwq
level=warning msg="underweighting node awvo1u8zp17i30jb0tze4cebj for service scogq490jtph6f5ahigrmvxl7 because it experienced 5 failures or rejections within 5m0s" module=node node.id=vz74i89jega7k0ccyekpplgwq
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleaseAddress: Post http://8.2.250.40:8181/IpamDriver.ReleaseAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 1s"
level=info msg="Node join event for container2-ba0d08b08afe/10.0.21.40"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleaseAddress: Post http://8.2.250.40:8181/IpamDriver.ReleaseAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 2s"
level=error msg="fatal task error" error="starting container failed: No such network: public-8-2" module="node/agent/taskmanager" node.id=vz74i89jega7k0ccyekpplgwq service.id=scogq490jtph6f5ahigrmvxl7 task.id=y3w4ai1tyirxtqumrp98bzadv
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleaseAddress: Post http://8.2.250.40:8181/IpamDriver.ReleaseAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 4s"
level=error msg="network public-8-2 remove failed: No such network: public-8-2" module="node/agent" node.id=vz74i89jega7k0ccyekpplgwq
level=error msg="remove task failed" error="No such network: public-8-2" module="node/agent" node.id=vz74i89jega7k0ccyekpplgwq task.id=njtqop3cb81v080k7f4lg5x88
level=error msg="network public-8-2 remove failed: No such network: public-8-2" module="node/agent" node.id=vz74i89jega7k0ccyekpplgwq
level=error msg="remove task failed" error="No such network: public-8-2" module="node/agent" node.id=vz74i89jega7k0ccyekpplgwq task.id=jizmlx0lgbmdo5bjg5ae2dkfs
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleaseAddress: Post http://8.2.250.40:8181/IpamDriver.ReleaseAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 8s"
level=warning msg="Failed to release gateway ip address 8.2.250.3 on delete of network public-8-2 (8jcmhqcq34jaeoa8qy2iguiw2): Post http://8.2.250.40:8181/IpamDriver.ReleaseAddress: dial tcp 8.2.250.40:8181: getsockopt: connection refused"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleasePool: Post http://8.2.250.40:8181/IpamDriver.ReleasePool: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 1s"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleasePool: Post http://8.2.250.40:8181/IpamDriver.ReleasePool: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 2s"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleasePool: Post http://8.2.250.40:8181/IpamDriver.ReleasePool: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 4s"
level=info msg="Node join event for container2-ba0d08b08afe/10.0.21.40"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.ReleasePool: Post http://8.2.250.40:8181/IpamDriver.ReleasePool: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 8s"
level=warning msg="Failed to release address pool 8.2.250.0/24 on delete of network public-8-2 (8jcmhqcq34jaeoa8qy2iguiw2): Post http://8.2.250.40:8181/IpamDriver.ReleasePool: dial tcp 8.2.250.40:8181: getsockopt: connection refused"
level=warning msg="Unable to connect to plugin: 8.2.250.40:8181/IpamDriver.RequestPool: Post http://8.2.250.40:8181/IpamDriver.RequestPool: dial tcp 8.2.250.40:8181: getsockopt: connection refused, retrying in 1s"
@daledude
Copy link
Author

daledude commented Oct 5, 2017

Further info when trying to remove network...

>docker network inspect public-8-2
[]
Error: No such network: public-8-2
>docker network inspect 8-2       
[
    {
        "Name": "8-2",
        "Id": "a8256807c57c964dddc6c633990adb84005901a32ccda503a776605dcaaae758",
        "Created": "2017-10-05T10:19:54.095247697-07:00",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "arp-ipam3",
            "Options": {},
            "Config": [
                {
                    "Subnet": "8.2.250.0/24",
                    "Gateway": "8.2.250.3"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": true,
        "Containers": {},
        "Options": {
            "parent": "public"
        },
        "Labels": {}
    }
]

@thaJeztah
Copy link
Member

ping @mavenugo @abhi PTAL

@thaJeztah
Copy link
Member

I was also having this issue while looking at #35099, and it looks to be related to a service using the network and failing to be creating due to an issue with the network's configuration

Steps to reproduce;

1. Create config-only network, and create a network using that:

docker network create -d macvlan --subnet 10.0.48.0/22 --gateway 10.0.48.1 -o parent=eno1 --config-only 10-0-48
docker network create -d macvlan --scope swarm --config-from 10-0-48 --attachable private-10-0-48

2. Create a service using that network

This fails because the eno1 parent VLAN does not exist on my machine (expected);

$ docker service create --detach=false --network name=private-10-0-48,alias=${HOSTNAME} --replicas 1 --name bla nginx:alpine
yc8civv5wnnlc0bflymw2povj
overall progress: 0 out of 1 tasks
1/1: invalid subinterface vlan name eno1, example formatting is eth0.10
^COperation continuing in background.
Use `docker service ps yc8civv5wnnlc0bflymw2povj` to check progress.

3. Remove the service

$ docker service rm bla

4. Cleanup the networks

After running the above, I tried to cleanup the unused networks. Here's the list of networks before:

$ docker network ls
NETWORK ID          NAME                  DRIVER              SCOPE
dc9b63fba648        10-0-48               null                local
400ef4d0237b        bridge                bridge              local
8b8af4f1eb84        docker_gwbridge       bridge              local
d4d040849154        edunet                bridge              local
57d193a9db9e        foo                   bridge              local
7f90f1113d26        foo2                  bridge              local
13cf280a1bbf        host                  host                local
yl7ch581l0tn        ingress               overlay             swarm
d9e4c03728a0        none                  null                local
t1j31pmmjvwg        private-10-0-48       macvlan             swarm
3ba0af34b2e5        testing               bridge              local

Run docker network prune to cleanup unused networks.

$ 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
Deleted Networks:
private-10-0-48
edunet
testing
foo2
foo

Pruning unused networks removed the private-10-0-48 network, but notice that the 10-0-48 config-only network is still listed (I think that's expected as well; config-only networks should not be removed by network prune):

$ docker network ls
NETWORK ID          NAME                  DRIVER              SCOPE
dc9b63fba648        10-0-48               null                local
400ef4d0237b        bridge                bridge              local
8b8af4f1eb84        docker_gwbridge       bridge              local
13cf280a1bbf        host                  host                local
yl7ch581l0tn        ingress               overlay             swarm
d9e4c03728a0        none                  null                local

Attempting to manually remove the config-only network doesn't work:

$ docker network rm dc9b63fba648
Error response from daemon: configuration network "10-0-48" is in use

Inspecting the network (including -v / --verbose) does not show anything using the network:

$ docker network inspect -v dc9b63fba648
[
    {
        "Name": "10-0-48",
        "Id": "dc9b63fba648567d7145f84dde8169ac2a1c2952f56c10295912d66b3346f9d6",
        "Created": "2017-10-06T10:37:06.818391382Z",
        "Scope": "local",
        "Driver": "null",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "10.0.48.0/22",
                    "Gateway": "10.0.48.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": true,
        "Containers": {},
        "Options": {
            "parent": "eno1"
        },
        "Labels": {}
    }
]

The logs also don't show anything useful (no reason for the error is printed):

Oct  6 11:25:29 moby root: time="2017-10-06T11:25:29.604414313Z" level=debug msg="Calling GET /_ping"
Oct  6 11:25:29 moby root: time="2017-10-06T11:25:29.605635420Z" level=debug msg="Calling GET /v1.32/networks/dc9b63fba648"
Oct  6 11:25:29 moby root: time="2017-10-06T11:25:29.610095740Z" level=debug msg="Calling DELETE /v1.32/networks/dc9b63fba648"

5. Additional information

This situation looks to be related to the service failing to be created. Only creating the network, then removing it does not reproduce the issue:

$ docker network create -d macvlan --subnet 10.0.49.0/22 --gateway 10.0.49.1 -o parent=eno2 --config-only vlannie-config
$ docker network create -d macvlan --scope swarm --config-from foo-config --attachable vlannie

Then prune the network:

$ 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
Deleted Networks:
vlannie

And remove the config-only network:

$ docker network rm vlannie-config
vlannie-config

@thaJeztah thaJeztah added kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/confirmed labels Oct 6, 2017
@boynux
Copy link
Contributor

boynux commented Oct 21, 2017

It looks like the problem is when we delete the service, I get this error:

ERRO[2017-10-21T13:34:18.336495538+02:00] network private-10-0-48-1 remove failed: No such network: private-10-0-48-1  module="node/agent" node.id=w281rxix25280np5w1nx3t981                                                
ERRO[2017-10-21T13:34:18.336553316+02:00] remove task failed

I get this error although there is private-10-0-48-1:

➜  ~ docker network ls                                                                                        
NETWORK ID          NAME                DRIVER              SCOPE
fac164b5c7cd        10-0-48             null                local
cfce75eaf3a0        10-0-48.1           null                local
b10efa15b33e        bridge              bridge              local
f974416bca10        docker_gwbridge     bridge              local
be375c45c3ad        host                host                local
l6jkp6umvf4j        ingress             overlay             swarm
33c86c48bbaa        none                null                local
c9phqi63np4r        private-10-0-48-1   macvlan             swarm

is it relevant? ...

@moby moby deleted a comment Oct 28, 2017
@thaJeztah
Copy link
Member

removed spam comment

@thaJeztah thaJeztah added this to Networking in maintainers-session Nov 14, 2017
@daledude daledude closed this as completed Dec 8, 2017
@thaJeztah
Copy link
Member

@daledude was there a reason you closed this one? If it's not resolved, I'd like to reopen this one for investigation

@Routhinator
Copy link

Confirming this still exists in the latest docker versions.

@Routhinator
Copy link

Additonal behaviour related to this issue. I am trying to remove the config network after having added the config network and a swarm macvlan network based on it. I discovered that swarm doesn't support static IP's for macvlan which renders swarm useless for my usecase, so I need to recreate this network locally to launch local containers with the required static IPs, and it's now saying I cannot create a network from this config network because the parent interface is in use by a non existent network which I presume is some sort of identifier for the now deleted swarm network:

routhinator@ursamajor:~$ docker network rm vlan-52
Error response from daemon: configuration network "vlan-52" is in use
routhinator@ursamajor:~$ docker network create -d macvlan --scope local --config-from vlan-52 macvlan-52
Error response from daemon: network dm-mvoi6a4xcms2 is already using parent interface bond0
routhinator@ursamajor:~$ docker network ls
NETWORK ID          NAME                     DRIVER              SCOPE
5e6455207aa5        bridge                   bridge              local
3a77f82010bb        docker_gwbridge          bridge              local
a053619f4aa5        host                     host                local
8r1l2xzg9o97        infrastructure_dba       overlay             swarm
u5azwkceqos6        infrastructure_default   overlay             swarm
ymmi56jfjd6f        infrastructure_proxy     overlay             swarm
mhlnytm687jc        ingress                  overlay             swarm
28b46f72ad91        none                     null                local
1f3e45d30a3d        vlan-52                  null                local
routhinator@ursamajor:~$ docker network rm dm-mvoi6a4xcms2
Error: No such network: dm-mvoi6a4xcms2

@Routhinator
Copy link

This error seems related: moby/libnetwork#1743

@itsgk92
Copy link

itsgk92 commented Feb 4, 2019

+1

@mback2k
Copy link

mback2k commented Mar 2, 2019

I am also experiencing this issue. Stopping docker, deleting /var/lib/docker/network/files/local-kv.db, starting docker again seems to have removed the network for now.

arkodg pushed a commit to arkodg/libnetwork that referenced this issue May 14, 2019
The endpoint count for --config-only networks
was being incremented even when the respective --config-from
inherited network was failing to create a network

This was due to a variable shadowing problem with err causing
the deferred function to not execute correctly.

Using the same err variable across the entire function fixes
the issue

Fixes: moby/moby#35101

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
@thaJeztah
Copy link
Member

Note that there's pull request open to address this; moby/libnetwork#2373

@daledude
Copy link
Author

wow, i just noticed this is still open.

@SGStino
Copy link

SGStino commented May 27, 2019

unfortunatly, unless I'm experiencing something else, I'd say it is :(
not many people use macvlans or have much use for them, let alone in a swarm setup.

@thaJeztah
Copy link
Member

reopening because moby/libnetwork#2373 was not yet vendored

@thaJeztah thaJeztah reopened this Jun 4, 2019
@alexei38
Copy link

alexei38 commented Jun 7, 2019

In what version can change will appear?

@thaJeztah
Copy link
Member

Looks like this was included in the libnetwork bump that's part of #39295, which has been cherry-picked into the 19.03 release branch in docker#260, so this is fixed on master, and will be in the 19.03 release

thaJeztah pushed a commit to thaJeztah/libnetwork that referenced this issue Jun 7, 2019
The endpoint count for --config-only networks
was being incremented even when the respective --config-from
inherited network failed to create a network

This was due to a variable shadowing problem with err causing
the deferred function to not execute correctly.

Using the same err variable across the entire function fixes
the issue

Fixes: moby/moby#35101

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit eacb56d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah pushed a commit to thaJeztah/libnetwork that referenced this issue Jun 24, 2019
The endpoint count for --config-only networks
was being incremented even when the respective --config-from
inherited network failed to create a network

This was due to a variable shadowing problem with err causing
the deferred function to not execute correctly.

Using the same err variable across the entire function fixes
the issue

Fixes: moby/moby#35101

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit eacb56d)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/docker that referenced this issue Jul 23, 2019
full diff: moby/libnetwork@e7933d4...55685ba

changes included:

- moby/libnetwork#2382 Backporting PR 2069 to bump_18.09
  - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress()
- moby/libnetwork#2363 [18.09] align dependencies with engine 18.09
- moby/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors
- moby/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks
  - backport of moby/libnetwork#2373
  - fixes moby#35101
- moby/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
docker-jenkins pushed a commit to docker/docker-ce that referenced this issue Jul 25, 2019
full diff: moby/libnetwork@e7933d4...55685ba

changes included:

- moby/libnetwork#2382 Backporting PR 2069 to bump_18.09
  - backport of https://github.com/docker/libnetwork#2069 Rolling back the port configs if failed to programIngress()
- moby/libnetwork#2363 [18.09] align dependencies with engine 18.09
- moby/libnetwork#2400 [18.09 backport] Fix TestValidRemoteDriver GetCapabilities errors
- moby/libnetwork#2391 [18.09 backport] Correctly clean up --config-only networks
  - backport of moby/libnetwork#2373
  - fixes moby/moby#35101
- moby/libnetwork#2392 [18.09 backport] remove gosimple - package is gone and it's not important

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 0a3767c7e9803f0a595a07b0548e99d60e861062
Component: engine
@agherzan
Copy link
Contributor

agherzan commented Oct 22, 2020

@thaJeztah Is there any workaround if I don't have the fix in the version I'm running?

EDIT: I'm sadly stuck on 18.09.8 and the fix landed in 18.09.9.

@thaJeztah
Copy link
Member

Don't think there's a workaround, but with Docker 18.09 being EOL, I'd highly recommend getting back to a supported version, as there are unpatched vulnerabilities in older versions.

Is there a specific reason you can't update?

@agherzan
Copy link
Contributor

Sadly yes - Synology DSM is on that version. And now I'm stuck with the daemon in this state.

@thaJeztah
Copy link
Member

Hmm... right, so they build their own binaries of docker. You could manually replace the binaries with the static binaries perhaps; https://docs.docker.com/engine/install/binaries/

@agherzan
Copy link
Contributor

That would be a pain because the docker daemon is integrated with a UI component. Anyway - if you can think of a workaround to get myself unblocked, give me a buzz.

@landcraft
Copy link

good to see I'm not the only one facing this issue (using Docker 18.09.8 on Synology, so cannot upgrade)...

Fingers crossed for a solution

@WhileDekker
Copy link

On a synology you can stop docker and then delete the file network /volume1/@docker/files/local-kv.db (similar as @SGStino mentioned), after you start docker again the file will be recreated with the standard networks (bridge,host,none)

Please NOTE: This will delete ALL your custom networks, but you get rid of that conf network ;-)

@agherzan
Copy link
Contributor

There is either a typo, or that path is different on my instance: /volume1/@docker/network/files/local-kv.db. I can also confirm that this fixes it.

@WhileDekker
Copy link

you are right: /volume1/@docker/network/files/local-kv.db is the path to the file on the synology docker

cpuguy83 pushed a commit to cpuguy83/docker that referenced this issue May 25, 2021
The endpoint count for --config-only networks
was being incremented even when the respective --config-from
inherited network failed to create a network

This was due to a variable shadowing problem with err causing
the deferred function to not execute correctly.

Using the same err variable across the entire function fixes
the issue

Fixes: moby#35101

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
@webash
Copy link

webash commented Nov 10, 2022

I've just experienced this issue on version 20.10.21 on 2 out of 3 nodes in a Docker Swarm. I'm assuming deleting the local-kv.db would not be advisable on Docker Swarm nodes?

Deleting the network utilising a config seems to have not released the dependency; now stuck with the config only network.

Here's some logs showing that deleting the swarm network has left remnants on one of the nodes

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

Anything I can do?

@RicardoM17
Copy link

@thaJeztah according to your comment above this seems to have been fixed in 19.03 release, but I'm having this issue/the issue described in moby/libnetwork#1743 in multiple machines in 20.10.11

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

Plenty of other people have also reported the same behaviour in multiple docker versions of 20.XX+. Is there a known solution (if for example it is solvable in configuration) or another version in which this was solved? If not should we maybe consider reopening this and/or the other issue?

Many thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking area/swarm kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. status/confirmed version/17.09
Projects
maintainers-session
  
Networking
Development

Successfully merging a pull request may close this issue.