I have an ECS Cluster with a capacity provider and a service. The capacity provider runs an autoscale group, and when one instance of this group starts, at the end I can see that there are ECS instances avalaible. Actually, I can connect to them through SSH.
The service also runs well, since it creates a new task which is based on a docker image at ERS repository. However, the task never pass from "PROVISIONING", and if I open the task I can see that the container of the task is void and loading. If I enter into my instance, I see the same docker instance if I do docker ps
or docker ps -a
. If I execute the agent docker exec id_docker /agent
I see:
level=info time=2022-05-02T21:16:05Z msg="Successfully got ECS instance credentials from provider: EC2RoleProvider" module=instancecreds.go
level=info time=2022-05-02T21:16:05Z msg="Starting Amazon ECS Agent" version="1.61.0" commit="05730614"
level=info time=2022-05-02T21:16:05Z msg="Loading configuration"
level=info time=2022-05-02T21:16:05Z msg="Successfully got ECS instance credentials from provider: EC2RoleProvider" module=instancecreds.go
If I try with docker exec id_docker bash
I get an error:
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "bash": executable file not found in $PATH: unknown
What's happening here? Any clue?