Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do I go to see what my ECS tasks are actually doing when they enter "pending" state?

My biggest frustration with ECS is that its not observable.

I deploy my service, my tasks go into "pending" and I cross my fingers.

Sometimes I get useful error messages in the console, sometimes they just hang out in "pending" indefinitely. I see no events being generated and have no idea what its trying to do or where it is stuck

I can restart the ECS service or other hacks I've had to do before, but at this point I'd like to see whats actually happening when a task is in "pending". Are their logs anywhere for this?

like image 386
red888 Avatar asked Jul 11 '18 22:07

red888


2 Answers

It won't tell you until it stops.

Click "Stopped" next to "Running" and you should find all the previously pending tasks that already failed. It should show a reason for these failures.

enter image description here

like image 196
Stéphane Bruckert Avatar answered Nov 03 '22 00:11

Stéphane Bruckert


  1. Click on that task which is in pending state. It will show you the single log status of the container and If you have attached the cloud watch logs It will show you the full logs about why it is pending?.

  2. Check the docker container logs by SSHing to the ec2 container instance of the task you are running.

like image 44
Sunil Valmiki Avatar answered Nov 03 '22 00:11

Sunil Valmiki