I have a docker swarm configuration with 3 nodes. There is a network that sits on only one of the nodes. On that particular node, docker network ls shows the network, docker network rm [network-id] says "Error response from daemon: network ... not found" while docker network inspect [network-id] show the network and it looks pretty good (Scope: swarm, Driver: overlay). Exactly like one that i have created test-wise in parallel to compare it with.
Any idea anyone? How can I get rid of that network- zombie?
Asked
Active
Viewed 2.6k times
21
JRoppert
- 321
2 Answers
25
How can I get rid of that network- zombie?
Please try the following.
docker network inspect <id> or <name>
Under Containers you see all the containers that are still connected to the network
docker network disconnect -f <networkID> <endpointName> or <endpointId> try both
Next remove all unused networks
docker network prune
Fixed the problem for me ;)
Matthis Kohli
- 351
- 2
- 5
1
I ran into a similar issue for my dev environment (unrelated to swarm) while experimenting with connecting containers across docker compose instances. I tried stopping / starting compose, killing containers, removing images, pruning networks, and restarting docker numerous times and in a variety of sequences, yet nothing worked.
Finally I ran the following on the problematic instance while the other compose instances were up, which did work:
docker system prune
This removed (per the warning):
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
user3006381
- 111