I have created a swarm cluster using the docs provided at docker.com. One of the tests is to…
docker service create --replicas 1 --name helloworld alpine ping docker.com
which works fine. Then another test is to
docker service scale helloworld=5
docker service ps helloworld
After this, I am seeif results like this…
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
8hlwrbbu5bmw helloworld.1 alpine:latest swarmma1 Running Running 31 seconds ago
mz67h5yj7su9 _ helloworld.1 alpine:latest swarmwrk1 Shutdown Failed 36 seconds ago “task: non-zero exit (1)”
jg4va5c1bpkz helloworld.2 alpine:latest swarmwrk1 Running Running less than a second ago
udtntu3xualt _ helloworld.2 alpine:latest swarmwrk1 Shutdown Failed 6 seconds ago “task: non-zero exit (1)”
sfuh96r2yutg _ helloworld.2 alpine:latest swarmwrk1 Shutdown Failed 16 seconds ago “task: non-zero exit (1)”
2iwnwayiouw7 helloworld.3 alpine:latest swarmwrk2 Running Running less than a second ago
q8n59wk726e8 _ helloworld.3 alpine:latest swarmwrk1 Shutdown Failed 6 seconds ago “task: non-zero exit (1)”
fxi8n9skn2qu _ helloworld.3 alpine:latest swarmwrk1 Shutdown Failed 16 seconds ago “task: non-zero exit (1)”
2pjd9ixf2lp5 helloworld.4 alpine:latest swarmma1 Running Running 21 seconds ago
yz4fyznbkg5o helloworld.5 alpine:latest swarmwrk2 Running Running 1 second ago
qpd6nq7ac33g _ helloworld.5 alpine:latest swarmwrk2 Shutdown Failed 6 seconds ago “task: non-zero exit (1)”
rcv7ui1f6v6p _ helloworld.5 alpine:latest swarmwrk2 Shutdown Failed 17 seconds ago “task: non-zero exit (1)”
The 5 replicas end up running on swarmma1 and none on swarmwrk1 or swarmwrk2
If I look at the logs from the swarmwrkrs I get this…
ping: bad address ‘docker.com’
Does anyone know what I am doing wrong?
Thank You