Why is the application deployed in the cluster always in the Preparing state

  docker, question

Learning Docker FollowGet-started documentKnock on the command, but deployment to the cluster has never been successful

docker@myvm1:~$ docker stack ps getstartedlab
 ID                  NAME                      IMAGE                     NODE                DESIRED STATE       CURRENT STATE             ERROR                              PORTS
 m8m3iuunad4j        getstartedlab_web.1       zhugw/get-started:first   myvm2               Running             Preparing 7 minutes ago
 1pktisekbhep        getstartedlab_web.2       zhugw/get-started:first   myvm1               Running             Preparing 7 minutes ago
 txajwwzsgqda        getstartedlab_web.3       zhugw/get-started:first   myvm1               Running             Preparing 6 minutes ago
 squwrcwogrld         \_ getstartedlab_web.3   zhugw/get-started:first   myvm1               Shutdown            Rejected 6 minutes ago    "No such image: zhugw/get-star…"
 x112kxpzygrm         \_ getstartedlab_web.3   zhugw/get-started:first   myvm2               Shutdown            Rejected 6 minutes ago    "No such image: zhugw/get-star…"
 oljcqz0c12xf         \_ getstartedlab_web.3   zhugw/get-started:first   myvm2               Shutdown            Rejected 6 minutes ago    "No such image: zhugw/get-star…"
 wenkp0lcbb0n         \_ getstartedlab_web.3   zhugw/get-started:first   myvm2               Shutdown            Rejected 6 minutes ago    "No such image: zhugw/get-star…"
 ry5oql1cnowa        getstartedlab_web.4       zhugw/get-started:first   myvm1               Running             Preparing 7 minutes ago
 8fvyp3ygagek        getstartedlab_web.5       zhugw/get-started:first   myvm2               Running             Preparing 7 minutes ago

Why is it always therePreparing? Cause the service cannot be provided normally

➜  ~ curl 'http://10.10.10.100'
 curl: (7) Failed to connect to 10.10.10.100 port 80: Connection refused

May be your network is not good, should be OK after a period of time.

Sure

$ docker-machine ssh $(docker-machine ip <manager_node_name>)
 <manager_node>$ cat /var/log/docker.log