Unable to reach docker swarm services externally

I’m running into an issue with setting up a docker swarm service. I have a 5-node cluster running on ubuntu 24.

Server Version: 27.1.1

Steps to reproduce:

  1. docker service create --name test_web --replicas 3 --publish published=8080,target=80 nginxdemos/hello

root@lnx01:/etc/docker# docker service create --name test_web --replicas 3 --publish published=8080,target=80 nginxdemos/hello
cmw0jr7rv3rvhnymntgm9ljzn
overall progress: 3 out of 3 tasks
1/3: running [==================================================>]
2/3: running [==================================================>]
3/3: running [==================================================>]
verify: Service cmw0jr7rv3rvhnymntgm9ljzn converged

  1. Service is running
    root@lnx01:/etc/docker# docker service ls
    ID NAME MODE REPLICAS IMAGE PORTS
    cmw0jr7rv3rv test_web replicated 3/3 nginxdemos/hello:latest *:8080->80/tcp

  2. Firewall Port is open

root@lnx01:/etc/docker# ufw status
Status: active

To Action From


9090 ALLOW Anywhere
10000 ALLOW Anywhere
443 ALLOW Anywhere
OpenSSH ALLOW Anywhere
20/tcp ALLOW Anywhere
21/tcp ALLOW Anywhere
990/tcp ALLOW Anywhere
4000:5000/tcp ALLOW Anywhere
8080 ALLOW Anywhere
2377 ALLOW Anywhere
7946 ALLOW Anywhere
4789 ALLOW Anywhere
8181 ALLOW Anywhere
80 ALLOW Anywhere
9090 (v6) ALLOW Anywhere (v6)
10000 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
20/tcp (v6) ALLOW Anywhere (v6)
21/tcp (v6) ALLOW Anywhere (v6)
990/tcp (v6) ALLOW Anywhere (v6)
4000:5000/tcp (v6) ALLOW Anywhere (v6)
8080 (v6) ALLOW Anywhere (v6)
2377 (v6) ALLOW Anywhere (v6)
7946 (v6) ALLOW Anywhere (v6)
4789 (v6) ALLOW Anywhere (v6)
8181 (v6) ALLOW Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)

root@lnx01:/etc/docker#

Here is my node setup:

root@lnx01:/etc/docker# docker node ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSION
dee1j2hn5g247wj3nrz0d45gr * lnx01 Ready Active Reachable 27.1.1
kzosfivryenvhfpcx7gynzsab lnx02 Ready Active 27.1.1
vxqamidvrfph7k0qssijrky5d lnx03 Ready Active 27.1.1
mznsbcpg5vml8fryguwoyyn25 lnx04 Ready Active Reachable 27.1.1
ra7797twxbgz0eudlff080z4d lnx05 Ready Active Leader 27.1.1
root@lnx01:/etc/docker#

I can run this container locally and successfully reach the container externally:

root@lnx01:/etc/docker# docker run -p 8080:80 -d nginxdemos/hello
208551d6b1722a072d9197f796744ea4ae33db0905c000a7a928514e83f6403ddock

My default address pool is Default Address Pool: 10.0.0.0/8 and I am wondering if it is an issue. I found this forum post that seems like it could be related to my issue, unfortunatley, the link is dead that goes to the solution.

Can anyone assist? I’m planning on using this for a school project but I’m just banging my head against a wall.


Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

```
echo "I am a code."
echo "An athletic one, and I wanna run."
```