I’m trying to use an attached overlay network.
The version of the nodes is:
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
pd7f0gm1c4kx28p91zos4or6l yamato Down Active 23.0.1
u8hn5nmb001fz6yzsf8clug39 iscandar Ready Active 23.0.1
l5gu7053pd5gm30grswdwibac suisei Ready Active 23.0.2
2pg6o8tsd0g7ps5bw9erxazp6 * tsuki Ready Active Leader 23.0.2
The network was created with the following command:
docker network create -d overlay --attachable overlay_proxy
I also ran a sample service:
docker service create --name whoami --network overlay_proxy containous/whoami
As I understand it, any container attached to this network should be able to curl whoami:80
, but this doesn’t happen, all devices in the swarm (except the one running the whoami task) give me the following error:
$ docker run --rm -it --network overlay_proxy nginx getent hosts whoami
10.0.1.16 whoami
$ docker run --rm -it --network overlay_proxy nginx curl whoami
curl: (28) Failed to connect to whoami port 80: Connection timed out
As you can see, it resolves the VIP correctly. The problem must be routing the packets or something.
Expected output:
docker run --rm -it --network overlay_proxy nginx curl whoami Hostname: b9e7a9faa312 IP: 127.0.0.1 IP: 10.0.1.17 IP: 172.20.0.3 RemoteAddr: 10.0.1.18:52708 GET / HTTP/1.1 Host: whoami User-Agent: curl/7.74.0 Accept: */*
What am I doing wrong? How can I debug this?
Journalctl of one of the nodes:
abr 04 14:05:43 iscandar dockerd[780]: time="2023-04-04T14:05:43.640302792+02:00" level=info msg="ignoring event" container=19a71185d9e0997a0b23da1643c199b62c51d1e5228f80d139734025bf282fd4 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
abr 04 14:05:44 iscandar dockerd[780]: time="2023-04-04T14:05:44.284593161+02:00" level=warning msg="Error (Unable to complete atomic operation, key modified) deleting object [endpoint rpszdau3mwhv4pi3qgzf88gbh e5aa5bab55b31b535c9e0a6ebef2271256d6081a689572bd7e95ad84ee83ab8b], retrying...."
abr 04 14:05:44 iscandar dockerd[780]: time="2023-04-04T14:05:44.336776228+02:00" level=info msg="initialized VXLAN UDP port to 4789 "
abr 04 14:05:44 iscandar dockerd[780]: time="2023-04-04T14:05:44.337044744+02:00" level=error msg="failed removing service binding for 0eb5521969bc8c712ea1be50dbf0701989440a2f8e3d0eaf24898dc9a6e50e71 epRec:{whoami.1.n5jd972ks2ql5hphmnpcjh20u whoami kekrt31a34blj55od7ug93fcv
I’m using a recently installed Debian, without touching the firewall, so ports should be open