aws中的docker swarm在重启后无法访问

我有一个Docker swarm,由一个主节点和两个工作节点组成,在AWS中运行,每天晚上我停止swarm集群运行的所有实例,并在第二天早上再次启动它们。 问题是,我每天都注意到几个服务无法启动,并且群体必须重新创build它们(这只是出于某种原因,总是在worker 1上发生),我不能ssh到worker1worker2上运行的任何服务我没有安排master任何服务)。 当服务失败时,我得到这个错误:

 task: non-zero exit (0): No such container: containerName 

PS ec2实例只有一个根ebs我正在运行它的群体。

另外,当我停止worker1时,swarm会调度worker2中的所有服务,但是我仍然无法从群集外对其进行ssh调用。 在我再次启动worker1并在worker1和worker2之间手动重新分配服务之后,一切正常( I can ssh to the containers but only the new ones created through the update command old ones still wont be accessible) 。 我用来重新分配的命令是:

 docker service update --force containerName 

结果

 unable to pin image registry:myImage to digest: Get https://registry:5000/v2/: dial tcp: lookup registry: no such host myContainer 

尽pipe上面的错误消息worker2上的服务将停止并将按预期在worker1上运行。