Update paused due to failure or early termination of task. OCI runtime create failed: container_linux.go:2… [DOCKER]
Solution 1
Something in your change is causing those containers to crash.
It could be your command option order. The service name always goes at the end. If you look at docker service update --help
you'll see it say:
Usage: docker service update [OPTIONS] SERVICE
Start a new update cycle by fixing the command:
sudo docker service update --network-add backend --publish-add 5001 result
Solution 2
Got the same error when using docker swarm and worker didn't have enough disc space to download the image to deploy.
Solution: login to worker using ssh and run docker system prune -f
to remove old images.
Neha
Entrepreneurial enthusiast exploring opportunities. https://www.instagram.com/ms.nehagupta/
Updated on June 05, 2022Comments
-
Neha almost 2 years
I tried to update my service with
sudo docker service update result --network-add backend --publish-add 5001
And got the error statingresult overall progress: 0 out of 1 tasks 1/1: starting container failed: OCI runtime create failed: container_linux.go:2… service update paused: update paused due to failure or early termination of task gyovus3crd23v3wb22m1lbxf5
However I stopped the process while service
result
was being created because it took long time. Is there any way to complete the process of creation now? -
Neha over 6 yearsHey @bret Thanks for the help! What a co-incidence, I faced this issue while attempting the assignment in your course on Udemy! :D It's a great one.
-
Bret Fisher over 6 yearsThat. is. amazing. hah!!
-
Charmie over 4 yearshi @BretFisher. Is there no way to check logs (if possible) of the replicas that failed to start? So I would know which command failed. Because in my case, I was able to update 3/5 replicas but encountered the same experience of "early termination of task". Btw, i'm watching your tutorial too.
-
Bret Fisher over 4 yearsA
docker service logs
command won't show you why a container won't start, because it's only the output of the app inside the container. You can inspect the tasks in the service to see what their exit error was, but first get their task ID withdocker service ps <servicename>
thendocker inspect <taskid>