Essential container in task exited

Chirag picture Chirag · Apr 16, 2019 · Viewed 22.2k times · Source

I am trying to configure my docker hub image with aws ecs..I have created repository, cluster, and task while running task am getting an error as an essential container in task exited 1. while trying to get exact error details I have found that some of my variables are shown as not configured.

find the screenshot attached of errors.

cluster details error detail

Answer

nathanpeck picture nathanpeck · Apr 16, 2019

You should setup the "Log Configuration" by specifying a log configuration in your task definition. I would recommend the awslogs configuration type, as this lets you see the logs from your container right inside the console.

Once you do that you will get a new tab on the task details screen called "Logs" and you can click that to see the output from your container as it was starting up. You will probably see some kind of error or crash as the "Essential container exited" error means that the container was expected to stay up and running, but it just exited.