

# Amazon ECS 중지된 작업 오류 메시지
<a name="stopped-task-error-codes"></a>

다음은 작업이 예기치 않게 중지될 때 나타날 수 있는 가능한 오류 메시지입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

**작은 정보**  
[Amazon ECS MCP 서버](ecs-mcp-introduction.md)를 AI 어시스턴트와 함께 사용하여 자연어로 작업 실패 및 컨테이너 로그를 분석할 수 있습니다.

중지된 태스크 오류 코드에는 이와 연결된 카테고리가 있습니다(예: 'ResourceInitializationError'). 각 카테고리에 대한 자세한 내용은 다음을 참조하세요.


| 카테고리 | 자세히 알아보기 | 
| --- | --- | 
|  TaskFailedToStart  |  [Amazon ECS TaskFailedToStart 오류 문제 해결](failed-to-start-error.md)  | 
|  ResourceInitializationError  |  [Amazon ECS ResourceInitializationError 오류 문제 해결](resource-initialization-error.md)  | 
| ResourceNotFoundException |  [Amazon ECS ResourceNotFoundException 오류 문제 해결](resource-not-found-error.md) | 
|  SpotInterruptionError  |  [Amazon ECS SpotInterruption 오류 문제 해결](spot-interruption-errors.md)  | 
|  InternalError  |  [Amazon ECS InternalError 오류 문제 해결](internal-error.md)  | 
|  OutOfMemoryError  |  [Amazon ECS OutOfMemoryError 오류 문제 해결](out-of-memory.md)  | 
|  ContainerRuntimeError  |  [Amazon ECS ContainerRuntimeError 오류 문제 해결](container-runtime-error.md)  | 
|  ContainerRuntimeTimeoutError  |  [Amazon ECS ContainerRuntimeTimeoutError 오류 문제 해결](container-runtime-timeout-error.md)  | 
|  CannotStartContainerError  |  [Amazon ECS CannotStartContainerError 오류 문제 해결](cannot-start-container.md)  | 
|  CannotStopContainerError  |  [Amazon ECS CannotStopContainerError 오류 문제 해결](cannot-stop-container.md)  | 
|  CannotInspectContainerError  |  [Amazon ECS CannotInspectContainerError 오류 문제 해결](cannot-inspect-container.md)  | 
|  CannotCreateVolumeError  |  [Amazon ECS CannotCreateVolumeError 오류 문제 해결](cannot-create-volume.md)  | 
| CannotPullContainer |  [Amazon ECS에서 CannotPullContainer 작업 오류](task_cannot_pull_image.md)  | 

# Amazon ECS TaskFailedToStart 오류 문제 해결
<a name="failed-to-start-error"></a>

다음은 몇 가지 `TaskFailedToStart` 오류 메시지와 오류를 수정하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## Unexpected EC2 error while attempting to Create Network Interface with public IP assignment enabled in subnet '*subnet-id*
<a name="subnet-error"></a>

이 오류는 Fargate 작업이 `awsvpc` 네트워크 모드를 사용하고 퍼블릭 IP 주소가 있는 서브넷에서 실행되지만 서브넷에 충분한 IP 주소가 없는 경우에 발생합니다.

Amazon EC2 콘솔의 서브넷 세부 정보 페이지나 `[describe-subnets](https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-subnets.html)`를 사용하여 가용 IP 주소 개수가 표시됩니다. 자세한 내용은 *Amazon VPC 사용 설명서*의 [View your subnet](https://docs.aws.amazon.com/vpc/latest/userguide/working-with-vpcs.html#view-subnet)을 참조하세요.

이 문제를 해결하기 위해 작업을 실행할 새 서브넷을 생성할 수 있습니다.

## InternalError: *<reason>*
<a name="internal-error-reason"></a>

이 오류는 ENI 연결을 요청할 때 발생합니다. Amazon EC2는 ENI의 프로비저닝을 비동기식으로 처리합니다. 프로비저닝 프로세스는 시간이 소요됩니다. 대기 시간이 길거나 보고되지 않은 실패가 있을 경우 Amazon ECS에 시간 초과가 발생합니다. ENI가 프로비저닝되는 시간이 있지만, 실패 시간 초과 이후에 보고서가 Amazon ECS로 전달됩니다. 이 경우, Amazon ECS에 사용 중인 ENI와 함께 보고된 태스크 실패가 표시됩니다.

## The selected task definition is not compatible with the selected compute strategy
<a name="compute-compatibility"></a>

이 오류는 시작 유형이 클러스터 용량 유형과 일치하지 않는 작업 정의를 선택한 경우에 발생합니다. 클러스터에 할당된 용량 공급자와 일치하는 태스크 정의를 선택해야 합니다.

## 사용하지 않는 디바이스 인덱스에 네트워크 인터페이스를 연결할 수 없음
<a name="compute-compatibility-cpu"></a>

이 오류는 `awsvpc` 네트워킹 유형을 사용할 때 작업에 필요한 CPU/메모리가 충분하지 않을 때 발생합니다. 먼저 CPU에서 인스턴스를 확인합니다. 자세한 내용은 *Amazon EC2 인스턴스 유형*의 [Amazon EC2 인스턴스 유형 사양](https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-instance-type-specifications.html)을 참조하세요. 인스턴스의 CPU 값을 가져와 해당 인스턴스의 ENI 수를 곱합니다. 이 값을 태스크 정의에서 사용하세요.

## AGENT
<a name="agent-not-started"></a>

태스크를 시작하려고 시도한 컨테이너 인스턴스에 현재 연결이 끊긴 에이전트가 있습니다. 작업 배치를 위한 대기 시간이 길어지는 것을 방지하기 위해 요청이 거부되었습니다.

연결이 끊어진 에이전트 문제 해결 방법에 대한 자세한 내용은 [연결이 끊어진 Amazon ECS 에이전트 문제를 해결하려면 어떻게 해야 하나요?](https://repost.aws/knowledge-center/ecs-agent-disconnected-linux2-ami)를 참조하세요.

# Amazon ECS ResourceInitializationError 오류 문제 해결
<a name="resource-initialization-error"></a>

다음은 몇 가지 `ResourceInitialization` 오류 메시지와 오류를 수정하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

**Topics**
+ [The task cannot pull registry authentication from Amazon ECR. There is a connection issue between the task and Amazon ECR. Check your task network configuration.](#unable-to-pull-secrets-ecr)
+ [The task can't download the environment variable files from Amazon S3. There is a connection issue between the task and Amazon S3. Check your task network configuration.](#failed-to-download-env-files)
+ [The task cannot pull secrets from AWS Systems Manager Parameter Store. Check your network connection between the task and AWS Systems Manager.](#unable-to-pull-secrets-sys-manager)
+ [The task can’t pull secrets from AWS Secrets Manager. There is a connection issue between the task and Secrets Manager. Check your task network configuration.](#unable-to-pull-secrets-asm-no-arn)
+ [The task can’t pull the secret from Secrets Manager. The task can't retrieve the secret with ARN ‘*secretARN*' from Secrets Manager. Check whether the secret exists in the specified Region.](#unable-to-pull-secrets-asm)
+ [pull command failed: unable to pull secrets or registry auth Check your task network configuration.](#pull-command-failed)
+ [The task cannot find the Amazon CloudWatch log group defined in the task definition. There is a connection issue between the task and Amazon CloudWatch. Check your network configuration.](#failed-to-initialize-logging-network)
+ [failed to initialize logging driver](#failed-to-initialize-logging)
+ [failed to invoke EFS utils commands to set up EFS volumes](#efs-utils-failed)

## The task cannot pull registry authentication from Amazon ECR. There is a connection issue between the task and Amazon ECR. Check your task network configuration.
<a name="unable-to-pull-secrets-ecr"></a>

이 오류는 작업을 Amazon ECR에 연결할 수 없음을 나타냅니다.

태스크와 Amazon ECR 간의 연결을 확인하세요. 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task can't download the environment variable files from Amazon S3. There is a connection issue between the task and Amazon S3. Check your task network configuration.
<a name="failed-to-download-env-files"></a>

이 오류는 작업이 Amazon S3에서 환경 파일을 다운로드할 수 없는 경우에 발생합니다.

태스크와 Amazon S3 VPC 엔드포인트 간의 연결을 확인하세요. 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task cannot pull secrets from AWS Systems Manager Parameter Store. Check your network connection between the task and AWS Systems Manager.
<a name="unable-to-pull-secrets-sys-manager"></a>

이 오류는 작업이 Systems Manager의 자격 증명을 사용하여 작업 정의에서 정의한 이미지를 가져올 수 없는 경우에 발생합니다.

태스크와 Systems Manager VPC 엔드포인트 간의 연결을 확인하세요. 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task can’t pull secrets from AWS Secrets Manager. There is a connection issue between the task and Secrets Manager. Check your task network configuration.
<a name="unable-to-pull-secrets-asm-no-arn"></a>

이 오류는 작업이 Secrets Manager의 자격 증명을 사용하여 작업 정의에서 정의한 이미지를 가져올 수 없는 경우에 발생합니다.

이 오류는 Systems Manager VPC 엔드포인트 및 작업 간 네트워크 연결 문제가 있음을 나타냅니다.

작업 및 엔드포인트 간 연결을 확인하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task can’t pull the secret from Secrets Manager. The task can't retrieve the secret with ARN ‘*secretARN*' from Secrets Manager. Check whether the secret exists in the specified Region.
<a name="unable-to-pull-secrets-asm"></a>

이 오류는 작업이 Secrets Manager의 자격 증명을 사용하여 작업 정의에서 정의한 이미지를 가져올 수 없는 경우에 발생합니다.

이 문제의 가능한 원인은 다음 중 하나입니다.


| 오류 원인 | 수행할 작업 | 
| --- | --- | 
|   Secrets Manager VPC 엔드포인트 및 작업 간 네트워크 연결 문제입니다. 오류 메시지에 다음 문자열 중 하나가 표시되는 경우 네트워크 문제에 해당합니다. [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/AmazonECS/latest/developerguide/resource-initialization-error.html)  |  작업 및 Secrets Manager 엔드포인트 간 연결을 확인합니다. 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.  | 
| 작업 정의에 정의된 작업 실행 역할에서 Secrets Manager에 대한 권한을 보유하지 않습니다. |  작업 실행 역할에 필요한 Secrets Manager 권한을 추가합니다. 자세한 내용은 [Secrets Manager 또는 Systems Manager 권한](task_execution_IAM_role.md#task-execution-secrets) 섹션을 참조하세요.  | 
| 암호 ARN이 존재하지 않음 | Secrets Manager에 ARN이 있는지 확인합니다. 이미지를 보는 방법에 대한 자세한 내용은 Secrets Manager 개발자 안내서의 [Find secrets in Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html)를 참조하세요. | 

## pull command failed: unable to pull secrets or registry auth Check your task network configuration.
<a name="pull-command-failed"></a>

이 오류는 태스크가 Amazon ECR, Systems Manager 또는 Secrets Manager에 연결할 수 없을 때 발생합니다. 이는 네트워크의 잘못된 구성 때문입니다.

이 문제를 해결하려면 태스크와 Amazon ECR 간의 연결을 확인하세요. 또한 태스크와 보안 암호를 저장하는 서비스(Systems Manager 또는 Secrets Manager) 간의 연결도 확인해야 합니다. 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task cannot find the Amazon CloudWatch log group defined in the task definition. There is a connection issue between the task and Amazon CloudWatch. Check your network configuration.
<a name="failed-to-initialize-logging-network"></a>

이 오류는 작업에서 작업 정의에 정의한 CloudWatch 로그 그룹을 찾지 못하는 경우에 발생합니다.

이 오류는 CloudWatch VPC 엔드포인트와 작업 간에 네트워크 연결 문제가 있음을 나타냅니다.

작업 및 엔드포인트 간 연결을 확인하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## failed to initialize logging driver
<a name="failed-to-initialize-logging"></a>

이 오류는 작업에서 작업 정의에 정의한 CloudWatch 로그 그룹을 찾지 못하는 경우에 발생합니다.

이 오류는 작업 정의에 CloudWatch 그룹이 없음을 나타냅니다.

다음 단계에 따라 누락된 CloudWatch를 찾으세요.

1. 다음 명령을 실행하여 태스크 정의 정보를 가져옵니다.

   ```
   aws ecs describe-task-definition \ 
       --task-definition task-def-name
   ```

   각 컨테이너의 출력을 확인하여 `awslogs-group` 값을 기록해 둡니다.

   ```
   "logConfiguration": {
                   "logDriver": "awslogs",
                   "options": {
                       "awslogs-group": "/ecs/example-group",
                       "awslogs-create-group": "true",
                       "awslogs-region": "us-east-1",
                       "awslogs-stream-prefix": "ecs"
                   },
   ```

1. 그룹이 CloudWatch에 있는지 확인합니다. 자세한 내용은 Amazon CloudWatch Logs 사용 설명서의 [로그 그룹 및 로그 스트림 작업](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html)을 참조하세요.**

   문제는 태스크 정의에 지정된 그룹이 잘못되었거나 로그 그룹이 존재하지 않는 것입니다.

1. 문제를 해결합니다.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/AmazonECS/latest/developerguide/resource-initialization-error.html)

## failed to invoke EFS utils commands to set up EFS volumes
<a name="efs-utils-failed"></a>

다음 문제로 인해 작업에 Amazon EFS 볼륨을 탑재하지 못할 수 있습니다.
+ Amazon EFS 파일 시스템이 올바르게 구성되지 않았습니다.
+ 작업에 필요한 권한이 없습니다.
+ 네트워크 및 VPC 구성과 관련된 문제가 있습니다.

 이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 AWS re:Post의 [Amazon EFS 볼륨을 AWS Fargate 작업에 마운트할 수 없는 이유는 무엇인가요?](https://repost.aws/knowledge-center/fargate-unable-to-mount-efs)를 참조하세요.

# Amazon ECS ResourceNotFoundException 오류 문제 해결
<a name="resource-not-found-error"></a>

다음은 몇 가지 ` ResourceNotFoundException` 오류 메시지와 오류를 수정하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## The task can't retrieve the secret with ARN '*sercretARN*' from AWS Secrets Manager. Check whether the secret exists in the specified Region.
<a name="unable-to-pull-secrets-ecr"></a>

이 오류는 작업이 Secrets Manager에서 암호를 검색할 수 없는 경우에 발생합니다. 즉, 작업 정의에 지정되고 암호(오류 메시지에 포함된 암호)가 Secrets Manager에 없습니다.

리전은 오류 메시지에 있습니다.

Fetching secret data from AWS Secrets Manager in region *region*: secret *sercretARN*: ResourceNotFoundException: Secrets Manager can't find the specified secret.

암호에 대한 자세한 내용은 *AWS Secrets Manager 사용 설명서*의 [Find secrets in AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html)를 참조하세요.

다음 테이블을 사용하여 오류를 확인하고 해결합니다.


| 문제 | 작업 | 
| --- | --- | 
| 암호는 작업 정의와 다른 리전에 있습니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/AmazonECS/latest/developerguide/resource-not-found-error.html) | 
| 작업 정의에 잘못된 암호 ARN이 있습니다. 올바른 암호는 Secrets Manager에 있습니다. | 올바른 암호로 작업 정의를 업데이트합니다. 자세한 내용은 Amazon Elastic Container Service API 참조의 [RegisterTaskDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RegisterTaskDefinition.html) 또는 [콘솔을 사용하여 Amazon ECS 작업 정의 업데이트](update-task-definition-console-v2.md) 섹션을 참조하세요. | 
| 암호가 더 이상 존재하지 않습니다. |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ko_kr/AmazonECS/latest/developerguide/resource-not-found-error.html)  | 

# Amazon ECS SpotInterruption 오류 문제 해결
<a name="spot-interruption-errors"></a>

`SpotInterruption` 오류의 원인은 Fargate 및 EC2마다 다릅니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## Fargate
<a name="fargate-spot-error"></a>

`SpotInterruption` 오류는 Fargate 스팟 용량이 없거나 Fargate에서 스팟 용량을 회수하는 경우에 발생합니다.

여러 가용 영역에서 작업을 실행하여 더 많은 용량을 확보할 수 있습니다.

## EC2
<a name="ec2-spot-error"></a>

이 오류는 사용 가능한 스팟 인스턴스가 없거나 EC2가 스팟 인스턴스 용량을 회수하는 경우에 발생합니다.

여러 가용 영역에서 인스턴스를 실행하여 더 많은 용량을 확보할 수 있습니다.

# Amazon ECS InternalError 오류 문제 해결
<a name="internal-error"></a>

**적용 대상**: Fargate

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

이 `InternalError` 오류는 에이전트에서 예기치 않은 비런타임 관련 내부 오류가 발생하는 경우에 나타납니다.

이 오류는 버전이 `1.4` 이상인 플랫폼을 사용하는 경우에만 발생합니다.

이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 메시지](stopped-task-error-codes.md) 섹션을 참조하세요.

# Amazon ECS OutOfMemoryError 오류 문제 해결
<a name="out-of-memory"></a>

다음은 몇 가지 OutOfMemoryError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## container killed due to memory usage
<a name="container-memory-usage"></a>

이 오류는 컨테이너의 프로세스가 태스크 정의에 할당된 것보다 많은 메모리를 소비하거나 호스트 또는 운영 체제 제약 조건에 따라 컨테이너가 종료될 때 발생합니다.

# Amazon ECS ContainerRuntimeError 오류 문제 해결
<a name="container-runtime-error"></a>

다음은 몇 가지 ContainerRuntimeError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## ContainerRuntimeError
<a name="container-runtime-error-1"></a>

이 오류는 에이전트가 런타임별 작업에 대해 `containerd`에서 예기치 않은 오류를 수신할 때 발생합니다. 이 오류는 일반적으로 에이전트 또는 `containerd` 런타임의 내부 오류로 인해 발생합니다.

이 오류는 플랫폼 버전 `1.4.0` 이상(Linux) 또는 `1.0.0` 이상(Windows)을 사용하는 경우에만 발생합니다.

이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 AWS re:Post에서 [Amazon ECS 태스크가 중지되었는데 이유가 무엇인가요?](https://repost.aws/knowledge-center/ecs-task-stopped)를 참조하세요.

# Amazon ECS ContainerRuntimeTimeoutError 오류 문제 해결
<a name="container-runtime-timeout-error"></a>

다음은 몇 가지 ContainerRuntimeTimeoutError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## Could not transition to running; timed out after waiting 1m or Docker timeout error
<a name="container-runtime-timeout-error-1"></a>

이 오류는 컨테이너가 제한 시간 내에 `RUNNING` 또는 `STOPPED` 상태로 전환 할 수 없을 때 발생합니다. 오류 메시지에 원인 및 제한 시간 값이 제공됩니다.

# Amazon ECS CannotStartContainerError 오류 문제 해결
<a name="cannot-start-container"></a>

다음은 몇 가지 CannotStartContainerError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## failed to get container status: *<reason>*
<a name="cannot-start-container-1"></a>

이 오류는 컨테이너를 시작할 수 없을 때 발생합니다.

컨테이너가 여기에 지정된 메모리를 초과하려 하면 해당 컨테이너가 중지됩니다. 컨테이너에 제공되는 메모리를 늘립니다. 태스크 정의에서 `memory` 파라미터를 사용하면 됩니다. 자세한 내용은 [Memory](task_definition_parameters.md#container_definition_memory) 섹션을 참조하세요.

# Amazon ECS CannotStopContainerError 오류 문제 해결
<a name="cannot-stop-container"></a>

다음은 몇 가지 CannotStopContainerError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## CannotStopContainerError
<a name="cannot-stop-container-1"></a>

이 오류는 컨테이너가 중지되었을 때 발생합니다.

이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 AWS re:Post에서 [Amazon ECS 태스크가 중지되었는데 이유가 무엇인가요?](https://repost.aws/knowledge-center/ecs-task-stopped)를 참조하세요.

# Amazon ECS CannotInspectContainerError 오류 문제 해결
<a name="cannot-inspect-container"></a>

다음은 몇 가지 CannotInspectContainerError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## CannotInspectContainerError
<a name="cannot-inspect-container-1"></a>

이 오류는 컨테이너 에이전트가 컨테이너 런타임을 통해 컨테이너를 설명할 수 없을 때 발생합니다.

플랫폼 버전 `1.3` 이하를 사용하면 Amazon ECS 에이전트가 Docker에서 이유를 반환합니다.

플랫폼 버전 `1.4.0` 이상(Linux) 또는 `1.0.0` 이상(Windows)을 사용하는 경우 Fargate 에이전트는 `containerd`에서 이유를 반환합니다.

이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 AWS re:Post에서 [Amazon ECS 태스크가 중지되었는데 이유가 무엇인가요?](https://repost.aws/knowledge-center/ecs-task-stopped)를 참조하세요.

# Amazon ECS CannotCreateVolumeError 오류 문제 해결
<a name="cannot-create-volume"></a>

다음은 몇 가지 CannotCreateVolumeError 오류 메시지와 오류를 해결하기 위해 수행할 수 있는 작업입니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

## CannotCreateVolumeError
<a name="cannot-create-volume-1"></a>

이 오류는 에이전트가 태스크 정의에 지정된 볼륨 마운트를 생성할 수 없는 경우에 발생합니다.

이 오류는 플랫폼 버전 `1.4.0` 이상(Linux) 또는 `1.0.0` 이상(Windows)을 사용하는 경우에만 발생합니다.

이 문제를 디버깅하고 해결하는 방법에 대한 자세한 내용은 AWS re:Post에서 [Amazon ECS 태스크가 중지되었는데 이유가 무엇인가요?](https://repost.aws/knowledge-center/ecs-task-stopped)를 참조하세요.

# Amazon ECS에서 CannotPullContainer 작업 오류
<a name="task_cannot_pull_image"></a>

다음 오류는 Amazon ECS가 지정된 컨테이너 이미지를 검색할 수 없어 작업을 시작하지 못했음을 나타냅니다.

**참고**  
1.4 Fargate 플랫폼 버전은 긴 오류 메시지를 자릅니다.

AWS Management Console을 사용하여 중지된 작업에서 오류 메시지를 확인하려면 [Amazon ECS 중지된 작업 오류 보기](stopped-task-errors.md) 섹션을 참조하세요.

**작은 정보**  
[Amazon ECS MCP 서버](ecs-mcp-introduction.md)를 AI 어시스턴트와 함께 사용하여 자연어로 이미지 풀 오류를 조사할 수 있습니다.

**Topics**
+ [The task can’t pull the image. Check that the role has the permissions to pull images from the registry.](#pull-request-image-not-found)
+ [The task cannot pull ‘*image-name*’ from the Amazon ECR repository ‘*repository URI*’. There is a connection issue between the task and Amazon ECR. Check your task network configuration.](#pull-image-io-timeout)
+ [The task can’t pull the image. Check your network configuration](#pull-request-image-not-found-network)
+ [CannotPullContainerError: 풀 이미지 매니페스트가 5회 재시도됨: 참조를 확인하지 못함](#pull-request-image-tag)
+ [API error (500): Get https://111122223333.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request canceled while waiting for connection](#request-canceled)
+ [API 오류](#pull-request-api-error)
+ [write /var/lib/docker/tmp/*GetImageBlob111111111*: no space left on device](#pull-request-write-error)
+ [ERROR: toomanyrequests: Too Many Requests or You have reached your pull rate limit.](#container-pull-too-many-requests)
+ [Error response from daemon: Get *url*: net/http: request canceled while waiting for connection](#container-pull-request-canceled-connection)
+ [ref pull has been retried 1 time(s): failed to copy: httpReaderSeeker: failed open: unexpected status code](#container-pull-failed-open)
+ [pull access denied](#container-pull-access-denied.title)
+ [pull command failed: panic: runtime error: invalid memory address or nil pointer dereference](#container-pull-runtime-error.title)
+ [error pulling image conf/error pulling image configuration](#container-pull-pulling-image.title)
+ [컨텍스트 취소됨](#container-pull-context-canceled)

## The task can’t pull the image. Check that the role has the permissions to pull images from the registry.
<a name="pull-request-image-not-found"></a>

이 오류는 권한 문제 때문에 작업이 작업 정의에 지정된 이미지를 가져올 수 없음을 나타냅니다.

이 문제를 해결하려면:

1. *Rrepository*에 이미지가 있는지 확인합니다. 이미지 보기에 대한 자세한 내용은 *Amazon Elastic Container Registry 사용 설명서*의 [Viewing image details in Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-info.html)을 참조하세요.

1. *role-arn*에 이미지를 가져올 수 있는 올바른 권한이 있는지 확인합니다.

   역할을 업데이트하는 방법에 대한 자세한 내용은 *AWS Identity and Access Management 사용 설명서*의 [역할에 대한 권한 업데이트](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-permissions.html)를 참조하세요.

   작업은 다음 역할 중 하나를 사용합니다.
   + Fargate에서의 태스크인 경우 태스크 실행 역할입니다. Amazon ECR의 추가 권한에 대한 자세한 내용은 [인터페이스 엔드포인트 권한을 통해 Amazon ECR 이미지를 가져오는 Fargate 작업](task_execution_IAM_role.md#task-execution-ecr-conditionkeys) 섹션을 참조하세요.
   + EC2를 사용하는 태스크의 경우 이는 컨테이너 인스턴스 역할입니다. Amazon ECR의 추가 권한에 대한 자세한 내용은 [Amazon ECR 권한](instance_IAM_role.md#container-instance-role-ecr) 섹션을 참조하세요.

## The task cannot pull ‘*image-name*’ from the Amazon ECR repository ‘*repository URI*’. There is a connection issue between the task and Amazon ECR. Check your task network configuration.
<a name="pull-image-io-timeout"></a>

이 오류는 작업을 Amazon ECR에 연결할 수 없음을 나타냅니다. *repository URI* 리포지토리에 대한 연결을 확인하세요.

이 문제를 확인하고 해결하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## The task can’t pull the image. Check your network configuration
<a name="pull-request-image-not-found-network"></a>

이 오류는 작업을 Amazon ECR에 연결할 수 없음을 나타냅니다.

이 문제를 확인하고 해결하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## CannotPullContainerError: 풀 이미지 매니페스트가 5회 재시도됨: 참조를 확인하지 못함
<a name="pull-request-image-tag"></a>

이 오류는 태스크가 이미지를 가져올 수 없음을 나타냅니다.

이 문제는 다음과 같은 방법으로 해결할 수 있습니다.
+ 태스크 정의에 지정된 이미지가 리포지토리의 이미지와 일치하는지 확인하세요.
+ Amazon ECS는 이미지 버전 안정성을 강화합니다. 원본 이미지를 더 이상 사용할 수 없는 경우 이 오류가 발생합니다. 이미지 태그는 이 동작을 적용하는 데 포함됩니다. 태스크 정의의 이미지를 태그로 :latest를 사용하는 것에서 특정 버전으로 변경합니다. 자세한 내용은 [컨테이너 이미지 확인](deployment-type-ecs.md#deployment-container-image-stability) 섹션을 참조하세요.

이 문제를 확인하고 해결하는 방법에 대한 자세한 내용은 [Amazon ECS 중지된 작업 오류 연결 확인](verify-connectivity.md) 섹션을 참조하세요.

## API error (500): Get https://111122223333.dkr.ecr.us-east-1.amazonaws.com/v2/: net/http: request canceled while waiting for connection
<a name="request-canceled"></a>

이 오류는 인터넷 경로가 존재하지 않아 연결 제한 시간이 초과되었음을 나타냅니다.

다음과 같은 방법으로 이 문제를 해결할 수 있습니다.
+ 퍼블릭 서브넷에 있는 작업의 경우 태스크를 시작할 때 **퍼블릭 IP 자동 할당(Auto-assign public IP)**을 **활성화됨(ENABLED)**으로 지정합니다. 자세한 내용은 [애플리케이션을 Amazon ECS 태스크로 실행](standalone-task-create.md) 섹션을 참조하세요.
+ 프라이빗 서브넷에 있는 작업의 경우 태스크를 시작할 때 **퍼블릭 IP 자동 할당(Auto-assign public IP)**을 **비활성화됨(DISABLED)**으로 지정하고 요청을 인터넷으로 라우팅하도록 VPC에 NAT 게이트웨이를 구성합니다. 자세한 내용은 *Amazon VPC 사용 설명서*의 [NAT 게이트웨이](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) 섹션을 참조하세요.

## API 오류
<a name="pull-request-api-error"></a>

이 오류는 Amazon ECR 엔드포인트에 연결 문제가 있음을 나타냅니다.

이 문제를 해결하는 방법에 대한 자세한 내용은 지원 웹 사이트의 [Amazon ECS에서 Amazon ECR 오류 'CannotPullContainerError: API error'를 해결하려면 어떻게 해야 하나요?](https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-api-error-ecr/)를 참조하세요.

## write /var/lib/docker/tmp/*GetImageBlob111111111*: no space left on device
<a name="pull-request-write-error"></a>

이 오류는 디스크 스페이스가 부족함을 나타냅니다.

이 문제를 해결하려면 디스크 스페이스를 늘리세요.

Amazon ECS 최적화 AMI를 사용하는 경우, 다음 명령을 사용하여 파일 시스템에서 가장 큰 파일 20개를 검색할 수 있습니다.

```
du -Sh / | sort -rh | head -20
```

출력 예시:

```
5.7G    /var/lib/docker/containers/50501b5f4cbf90b406e0ca60bf4e6d4ec8f773a6c1d2b451ed8e0195418ad0d2
1.2G    /var/log/ecs
594M    /var/lib/docker/devicemapper/mnt/c8e3010e36ce4c089bf286a623699f5233097ca126ebd5a700af023a5127633d/rootfs/data/logs
...
```

일부 경우에 실행 중인 컨테이너로 루트 볼륨을 채울 수 있습니다. 컨테이너에서 기본 `json-file` 로그 드라이브를 `max-size` 제한 없이 사용하는 경우, 로그 파일이 스페이스의 대부분을 사용하는 것일 수 있습니다. `docker ps` 명령으로 위 출력의 디렉토리 이름을 컨테이너 ID로 매핑하여 스페이스를 사용하는 컨테이너를 확인할 수 있습니다. 예:

```
CONTAINER ID   IMAGE                            COMMAND             CREATED             STATUS              PORTS                            NAMES
50501b5f4cbf   amazon/amazon-ecs-agent:latest   "/agent"            4 days ago          Up 4 days                                            ecs-agent
```

기본적으로 `json-file` 로그 드라이버를 사용할 때 Docker는 전체 컨테이너의 표준 출력(및 표준 오류)를 캡처하고 이것을 JSON 형식으로 파일에 작성합니다. 로그 파일이 스페이스를 너무 많이 차지하는 것을 방지하는 로그 드라이버 옵션으로 `max-size`를 설정할 수 있습니다. 자세한 내용은 Docker 설명서의 [JSON 파일 로깅 드라이버](https://docs.docker.com/engine/logging/drivers/json-file/)를 참조하세요.

다음은 이 옵션을 사용하는 방법을 보여주는 컨테이너 정의 조각입니다.

```
{
    "log-driver": "json-file",
    "log-opts": {
        "max-size": "256m"
    }
}
```

또는 컨테이너 로그가 디스크 스페이스를 너무 많이 차지할 경우 `awslogs` 로그 드라이버를 사용하는 방법도 있습니다. `awslogs` 로그 드라이버는 CloudWatch로 로그를 전송하기 때문에 컨테이너 인스턴스에서 컨테이너 로그용으로 사용되는 만큼의 디스크 스페이스가 생깁니다. 자세한 내용은 [Amazon ECS 로그를 CloudWatch로 전송](using_awslogs.md) 섹션을 참조하세요.

Docker에서 액세스할 수 있는 디스크 크기를 업데이트해야 할 수 있습니다.

자세한 내용은 [CannotPullContainerError: no space left on device](https://repost.aws/questions/QUx6Ix1R1SSNisYSs1Sw8EBA/cannotpullcontainererror-no-space-left-on-device)를 참조하세요.

## ERROR: toomanyrequests: Too Many Requests or You have reached your pull rate limit.
<a name="container-pull-too-many-requests"></a>

이 오류는 Docker Hub 속도 제한이 있음을 나타냅니다.

다음 오류 중 하나가 발생하는 경우 Docker Hub 속도 제한에 도달했을 가능성이 있습니다.

Docker Hub 속도 제한에 대한 자세한 내용은 [Docker Hub 속도 제한 이해](https://www.docker.com/increase-rate-limits) 섹션을 참조하세요.

Docker Hub 속도 제한을 늘리고 컨테이너 인스턴스에 대한 Docker 가져오기를 인증해야 하는 경우 [Private registry authentication for container instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/private-auth-container-instances.html)를 참조하세요.

## Error response from daemon: Get *url*: net/http: request canceled while waiting for connection
<a name="container-pull-request-canceled-connection"></a>

이 오류는 인터넷 경로가 존재하지 않아 연결 제한 시간이 초과되었음을 나타냅니다.

다음과 같은 방법으로 이 문제를 해결할 수 있습니다.
+ 퍼블릭 서브넷에 있는 작업의 경우 태스크를 시작할 때 **퍼블릭 IP 자동 할당(Auto-assign public IP)**을 **활성화됨(ENABLED)**으로 지정합니다. 자세한 내용은 [애플리케이션을 Amazon ECS 태스크로 실행](standalone-task-create.md) 섹션을 참조하세요.
+ 프라이빗 서브넷에 있는 작업의 경우 태스크를 시작할 때 **퍼블릭 IP 자동 할당(Auto-assign public IP)**을 **비활성화됨(DISABLED)**으로 지정하고 요청을 인터넷으로 라우팅하도록 VPC에 NAT 게이트웨이를 구성합니다. 자세한 내용은 *Amazon VPC 사용 설명서*의 [NAT 게이트웨이](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) 섹션을 참조하세요.

## ref pull has been retried 1 time(s): failed to copy: httpReaderSeeker: failed open: unexpected status code
<a name="container-pull-failed-open"></a>

이 오류는 이미지를 복사할 때 실패했음을 나타냅니다.

이 문제를 해결하려면 다음 문서 중 하나를 검토합니다.
+ Fargate 작업에 대한 자세한 내용은 [Fargate의 내 Amazon ECS 작업에 대한 "cannotpullcontainererror" 오류를 해결하는 방법](https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-pull-container-error/)을 참조하세요.
+ 기타 작업에 대한 자세한 내용은 [내 Amazon ECS 작업에 대한 "cannotpullcontainererror" 오류를 해결하는 방법](https://aws.amazon.com/premiumsupport/knowledge-center/ecs-pull-container-error/)을 참조하세요.

## pull access denied
<a name="container-pull-access-denied.title"></a>

이 오류는 이미지에 대한 액세스 권한이 없음을 나타냅니다.

이 문제를 해결하려면 Amazon ECR을 사용하여 Docker 클라이언트를 인증해야 할 수 있습니다. 자세한 내용은 *Amazon ECR 사용 설명서*의 [프라이빗 레지스트리 인증](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html)을 참조하세요.

## pull command failed: panic: runtime error: invalid memory address or nil pointer dereference
<a name="container-pull-runtime-error.title"></a>

이 오류는 잘못된 메모리 주소 또는 nil 포인터 역참조로 인해 이미지에 액세스할 수 없음을 나타냅니다.

이 문제를 해결하려면:
+ Amazon S3에 접속하기 위한 보안 그룹 규칙이 있는지 확인합니다.
+ 게이트웨이 엔드포인트를 사용하는 경우, 엔드포인트에 액세스하려면 라우팅 테이블에 경로를 추가해야 합니다.

## error pulling image conf/error pulling image configuration
<a name="container-pull-pulling-image.title"></a>

이 오류는 속도 제한에 도달했거나 네트워크 오류가 있음을 나타냅니다.

이 문제를 해결하려면 [How can I resolve the "CannotPullContainerError" error in my Amazon ECS EC2 Launch Type Task](https://repost.aws/knowledge-center/ecs-pull-container-error)를 참조하세요.

## 컨텍스트 취소됨
<a name="container-pull-context-canceled"></a>

이 오류는 컨텍스트가 취소되었음을 나타냅니다.

이 오류의 일반적인 원인은 작업에서 사용 중인 VPC에 Amazon ECR에서 컨테이너 이미지를 가져오기 위한 경로가 없기 때문입니다.