Sometimes the errors occured… Don’t panic. There are always several ways out.
Some time ago, I was pretty surprised with that "STOPPED".
Checking Stopped Tasks for Errors
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/stopped-task-errors.htmlDocker Diagnostics
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-diags.html
For troubleshooting, first of all, click on the "Stopped" Task. In the Details section, inspect the Stopped reason field to see the reason that the task was stopped.
The documentation says:
If a container marked as essential in task definitions exits or dies, that can cause a task to stop. When an essential container exiting is the cause of a stopped task, the Step 6 can provide more diagnostic information as to why the container stopped.
Expand the container and inspect the Status reason row to see what caused the task state to change.
You should check logs under CloudWatch -> Logs
.
Nothing informative for me. I need connect to the container instance with SSH and inspect the Docker container locally.
docker ps -a
docker logs e985e721746f