docker swarm doesn't add some ports to iptables randomly #45171
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/0-triage
version/20.10
Description
This only happens on rare events when a node gets disconnected from the swarm (most likely due to an internet hiccup, or home ISP connection drop) and then reconnected again.
I have a
pihole
cointainer with ports53
,80
,67
which become inaccessible after such a reconnection due to these ports not being added back toiptables
by swarm. They are, however, still listed indocker ps
.Here is the
sudo docker ps
output after such a reconnect (the containers were recreated by the swarm on this node 2 hours ago):And here is the
iptables
output (please note that only the ports forcloudflared
container5053
are listed, and not thepihole
ports53
,80
):Then I do
service docker restart
to fix everything.Here is the new
sudo docker ps
(note that53/tcp
became0.0.0.0:53->53/tcp
on thepihole
container, strange, but might be a hint):And here are the new (correct)
iptables
(please note that theDOCKER
chain is now filled correctly withpihole
ports53
,80
):Reproduce
I don't have the exact steps to reproduce it as it happens only at night when I sleep (and my home internet connection gets reset).
Expected behavior
Swarm should correctly add all the ports back to
iptables
, so they would be accessible from outside.docker version
docker info
Additional Info
The
pihole
services was created via:The text was updated successfully, but these errors were encountered: