We are trying to setup a docker swarm cluster made of 3 Azure Linux (Ubuntu 20.04) Vms (vms are behind vnet), all nodes are managers.
- swarm init…
- swarm join… with manager token
- so far so good.
Right now we are facing an issue, where by deploying stack file with one service to one node, it is only accessible from within host IP, it is not possible to request it from other node’s IP addresses.
If service is deployed to VM0 it is accessible from VM0 IP address, If on VM1 then VM1 IP address, if VM2 then VM2 Ip address, but when I deployed 3 replicas into the nodes, well then none was accessible.
We are having docker swarm ports opened on each VM (2377 TCP, 7946 TCP/UDP, 4789 UDP).
After a lot of researches, I got to that thread, I’ve also run the https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh with the following output similar on each VM
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- apparmor: enabled and tools installed
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: enabled
- CONFIG_MEMCG: enabled
- CONFIG_KEYS: enabled
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled (as module)
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_IP_NF_FILTER: enabled (as module)
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_IPVS: enabled (as module)
- CONFIG_NETFILTER_XT_MARK: enabled (as module)
- CONFIG_IP_NF_NAT: enabled (as module)
- CONFIG_NF_NAT: enabled (as module)
- CONFIG_POSIX_MQUEUE: enabled
- CONFIG_CGROUP_BPF: enabled
Optional Features:
- CONFIG_USER_NS: enabled
- CONFIG_SECCOMP: enabled
- CONFIG_SECCOMP_FILTER: enabled
- CONFIG_CGROUP_PIDS: enabled
- CONFIG_MEMCG_SWAP: enabled
(cgroup swap accounting is currently enabled)
- CONFIG_BLK_CGROUP: enabled
- CONFIG_BLK_DEV_THROTTLING: enabled
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: enabled
- CONFIG_NET_CLS_CGROUP: enabled (as module)
- CONFIG_CGROUP_NET_PRIO: enabled
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_IP_NF_TARGET_REDIRECT: enabled (as module)
- CONFIG_IP_VS: enabled (as module)
- CONFIG_IP_VS_NFCT: enabled
- CONFIG_IP_VS_PROTO_TCP: enabled
- CONFIG_IP_VS_PROTO_UDP: enabled
- CONFIG_IP_VS_RR: enabled (as module)
- CONFIG_SECURITY_SELINUX: enabled
- CONFIG_SECURITY_APPARMOR: enabled
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Network Drivers:
- "overlay":
- CONFIG_VXLAN: enabled
- CONFIG_BRIDGE_VLAN_FILTERING: enabled
Optional (for encrypted networks):
- CONFIG_CRYPTO: enabled
- CONFIG_CRYPTO_AEAD: enabled
- CONFIG_CRYPTO_GCM: enabled
- CONFIG_CRYPTO_SEQIV: enabled
- CONFIG_CRYPTO_GHASH: enabled
- CONFIG_XFRM: enabled
- CONFIG_XFRM_USER: enabled (as module)
- CONFIG_XFRM_ALGO: enabled (as module)
- CONFIG_INET_ESP: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_BPF: enabled (as module)
- "ipvlan":
- CONFIG_IPVLAN: enabled (as module)
- "macvlan":
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_DUMMY: enabled (as module)
- "ftp,tftp client in container":
- CONFIG_NF_NAT_FTP: enabled (as module)
- CONFIG_NF_CONNTRACK_FTP: enabled (as module)
- CONFIG_NF_NAT_TFTP: enabled (as module)
- CONFIG_NF_CONNTRACK_TFTP: enabled (as module)
- Storage Drivers:
- "btrfs":
- CONFIG_BTRFS_FS: enabled (as module)
- CONFIG_BTRFS_FS_POSIX_ACL: enabled
- "overlay":
- CONFIG_OVERLAY_FS: enabled (as module)
- "zfs":
- /dev/zfs: present
- zfs command: missing
- zpool command: missing
Limits:
- /proc/sys/kernel/keys/root_maxkeys: 1000000
The only one interesting log message I found so far, was by running command:
journalctl -u docker
Which returned:
#...
Jul 13 11:52:40 VM0 dockerd[936130]: time="2023-07-13T11:52:40.610109700Z" level=warning msg="memberlist: Was able to connect to ff71167a01a4 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:52:41 VM0 dockerd[936130]: time="2023-07-13T11:52:41.610215400Z" level=warning msg="memberlist: Was able to connect to c2511b8ddc22 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:52:42 VM0 dockerd[936130]: time="2023-07-13T11:52:42.610929200Z" level=warning msg="memberlist: Was able to connect to ff71167a01a4 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:52:43 VM0 dockerd[936130]: time="2023-07-13T11:52:43.611126400Z" level=warning msg="memberlist: Was able to connect to c2511b8ddc22 over TCP but UDP probes failed, network may be misconfigured"
#...
Jul 13 12:10:24 VM1 dockerd[4159179]: time="2023-07-13T12:10:24.105735500Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 12:10:25 VM1 dockerd[4159179]: time="2023-07-13T12:10:25.106073400Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 12:10:26 VM1 dockerd[4159179]: time="2023-07-13T12:10:26.106978700Z" level=warning msg="memberlist: Was able to connect to c2511b8ddc22 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 12:10:28 VM1 dockerd[4159179]: time="2023-07-13T12:10:28.070028000Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
#...
Jul 13 11:50:53 VM2 dockerd[947263]: time="2023-07-13T11:50:53.552678300Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:50:54 VM2 dockerd[947263]: time="2023-07-13T11:50:54.553436600Z" level=warning msg="memberlist: Was able to connect to ff71167a01a4 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:50:56 VM2 dockerd[947263]: time="2023-07-13T11:50:56.543367000Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:50:57 VM2 dockerd[947263]: time="2023-07-13T11:50:57.543746300Z" level=warning msg="memberlist: Was able to connect to ff71167a01a4 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:50:58 VM2 dockerd[947263]: time="2023-07-13T11:50:58.544865000Z" level=warning msg="memberlist: Was able to connect to ff71167a01a4 over TCP but UDP probes failed, network may be misconfigured"
Jul 13 11:50:59 VM2 dockerd[947263]: time="2023-07-13T11:50:59.545597700Z" level=warning msg="memberlist: Was able to connect to 4c68bc3249c9 over TCP but UDP probes failed, network may be misconfigured"
I’ve tried to us nc
to test UDP connectivity, but it seems to work:
# from VM0
nc -vzu <VM1 IP> 7946
Connection to <vm1 IP> 7946 port [udp/*] succeeded!
nc -vzu <VM1 IP> 4789
Connection to <vm1 IP> 4789 port [udp/*] succeeded!
nc -vzu <VM2 IP> 7946
Connection to <VM2 IP> 7946 port [udp/*] succeeded!
nc -vzu <VM2 IP> 4789
Connection to <VM2 IP> 4789 port [udp/*] succeeded!
Did it for all 3 vms and all results are the same, any ideas what the journactl log might mean?
What else I could check?