Stopped tasks error codes - Amazon ECS

Stopped tasks error codes

The following are the possible error messages you may receive when your Fargate task is stopped unexpectedly. The error messages are returned by the container agent and the prefix is dependent on the platform version the task is using.

To check your stopped tasks for an error message using the AWS Management Console, see Checking stopped tasks for errors.

Error message prefix in platform version 1.3 and prior

Error message prefix in platform version 1.4 and later

Details

Example

DockerTimeoutError

ContainerRuntimeTimeoutError

This error occurs when a container was unable to transition to either a RUNNING or STOPPED state within the timeout period. The reason and timeout value is provided in the error message.

ContainerRuntimeTimeoutError: Could not transition to running; timed out after waiting 1m: <reason>

CannotStartContainerError

CannotStartContainerError

This error occurs when a container is unable to be started.

CannotStartContainerError: failed to get container status: <reason>

CannotStopContainerError

CannotStopContainerError

This error occurs when a container is unable to be stopped.

CannotStopContainerError: failed sending SIGTERM to container: <reason>

CannotInspectContainerError

CannotInspectContainerError

This error occurs when the container agent is unable to describe the container via the container runtime.

When using platform version 1.3 or prior, the ECS agent will return the reason from Docker.

When using platform version 1.4 or later, the Fargate agent will return the reason from containerd.

CannotInspectContainerError: <reason>

ResourceInitializationError

This error occurs when the Fargate agent fails to create or bootstrap the resources required to start the container or the task is belongs to.

This error only occurs if using platform version 1.4 or later.

ResourceInitializationError: failed to initialize logging driver: <reason>

CannotPullContainerError

CannotPullContainerError

This error occurs when the agent is unable to pull the container image specified in the task definition. For more information, see CannotPullContainer task errors.

CannotPullContainerError: <reason>

CannotCreateVolumeError

This error occurs when the agent is unable to create the volume mount specified in the task definition.

This error only occurs if using platform version 1.4 or later.

CannotCreateVolumeError: <reason>

ContainerRuntimeError

This error occurs when the agent receives an unexpected error from containerd for a runtime-specific operation. This error is usually caused by an internal failure in the agent or the containerd runtime.

This error only occurs if using platform version 1.4 or later.

ContainerRuntimeError: failed to create container IO set: <reason>

OutOfMemoryError

OutOfMemoryError

This error occurs when a container exits due to processes in the container consuming more memory than was allocated in the task definition.

OutOfMemoryError: container killed due to memory usage

InternalError

This error occurs when the agent encounters an unexpected, non-runtime related internal error.

This error only occurs if using platform version 1.4 or later.

InternalError: <reason>