

# 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)를 참조하세요.