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.

Note

The 1.4 Fargate platform version truncates long error messages.

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 can't 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 can't be started.

CannotStartContainerError: failed to get container status: <reason>

CannotStopContainerError

CannotStopContainerError

This error occurs when a container ican't be stopped.

CannotStopContainerError: failed sending SIGTERM to container: <reason>

CannotInspectContainerError

CannotInspectContainerError

This error occurs when the container agent can't describe the container through 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 container agent for your Fargate task fails to create or bootstrap the resources required to start the container or the task is belongs to.

A common cause for this error is using a VPC that doesn't have DNS resolution enabled.

This error only occurs if using platform version 1.4.0 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 can't 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>

TaskFailedToStart TaskFailedToStart This error occurs when an ENI attachment is requested. Amazon EC2 asynchronously handles the provisioning of the ENI. The provisioing process takes time. Amazon ECS has a timeout in case there are long wait times or unreported failures. There are times when the ENI is provisioned, but the report comes to Amazon ECS after the failur timeout. In this case, Amazon ECS sees the reported task failure with an in-use ENI. Timeout waiting for network interface provisioning to complete