Docker Community Forums

Share and learn in the Docker community.

How to restart a failed replication in the service like 1/2

Our production is running with docker swarm cluster, sometimes some of the service replications ran failed, the service replicas status is “1/2”, which means one replication is running and the other one failed to start up after max retry.
I tried to restart the service with command: “docker service update service --force”
but it will restart the running replication first and then whole service is down.
Is there any way to specifically restart the failed replication?

Thanks !

I find a solution :
scale the service to 3 replicas: "docker service scale service=3 ";
after it start up a new replicas successfully, then scale the service back to 2 replicas, that works for me