EC2 Linux 인스턴스의 AWS 복제 에이전트 설치 실패 문제를 해결하려면 어떻게 해야 합니까?

6분 분량
0

AWS 애플리케이션 마이그레이션 서비스 또는 AWS Elastic Disaster Recovery용 AWS 복제 에이전트를 설치하고 싶습니다. Amazon Elastic Compute Cloud(Amazon EC2) Linux 인스턴스에서 설치가 실패했습니다.

해결 방법

다음 해결 방법은 Linux 운영 체제의 가장 일반적인 AWS Replication Agent 설치 오류를 다룹니다.

오류 확인

AWS Replication Agent 설치 프로그램 로그에는 로그 끝부터 오류가 표시됩니다.

다음 명령을 실행하여 설치 프로그램 로그의 마지막 페이지를 보고 오류를 확인합니다.

less +G aws_replication_installer.log

발견한 오류를 해결하려면 해당 오류와 관련된 섹션의 절차를 따르세요.

Error: failed to map segment from shared object: 작업이 허용되지 않음

오류 예시:

“"./aws-replication-installer-64bit: error while loading shared libraries: libz.so .1: failed to map segment from shared object: Operation not permitted"

설치 스크립트는 /tmp 디렉터리를 사용합니다. /tmpnoexec가 설정된 경우 libz.so는 세그먼트를 매핑할 수 없습니다. 이 경우 이 작업이 허용되지 않음 오류가 표시됩니다.

이 오류를 해결하려면 다음 명령을 실행하여 실행 권한이 있는 볼륨을 마운트하세요.

# sudo mount /tmp -o remount,exec

Error: security token included in the request is expired

오류 예시

"botocore.exceptions.ClientError: An error occurred (ExpiredTokenException) when calling the GetAgentInstallationAssetsForDrs operation: The security token included in the request is expired [installation_id: 1a9af9d3-9485-4e02-965e-611929428c61, agent_version: 3.7.0, mac_addresses: 206915885515739,206915885515740, _origin_client_type: installer]"

이 오류는 AWS 식별 및 액세스 관리(IAM) 역할이 만료되어 발생하는 경우가 많습니다. IAM 역할이 만료되면, 애플리케이션 마이그레이션 서비스 또는 Elastic 재해 복구 엔드포인트에 대한 API 직접 호출이 실패합니다.

이 문제를 해결하려면 IAM 역할을 새로 고치거나 액세스 키 또는 비밀 액세스 키를 사용하여 역할을 설치하세요. 자세한 내용은 다음 AWS 설명서를 참고하세요.

Error: Module aws_replication_driver is not currently loaded

오류 예시

"rmmod: ERROR: Module aws_replication_driver is not currently loaded insmod: ERROR: could not insert module ./aws-replication-driver.ko: Required key not available"

이 오류는 소스 인스턴스에서 보안 부팅이 켜져 있을 때 발생합니다. Application Migration Service 및 Elastic Disaster Recovery는 보안 부팅을 지원하지 않습니다.

이 오류를 해결하려면 소스 인스턴스에서 보안 부팅을 끄세요.

Error: ssl.SSLCertVerificationError

오류 예시

"ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997) - urllib.error.URLError: <urlopen error unknown url type: https>"

이 오류는 클라이언트가 Python 3.10 이상의 이전 OS 버전을 사용하는 경우 발생할 수 있습니다. Python 3.10은 Python 개선 제안 웹 사이트에서 PEP 644 - OpenSSL 1.1.1 이상 필요 제안을 추가했습니다.

이전 OS 버전에는 Python 3.10을 지원하는 최신 OpenSSL 라이브러리가 없습니다. 따라서 AWS Replication Agent 설치가 Application Migration Service 또는 Elastic Disaster Recovery 엔드포인트에 대한 SSL 인증서를 확인하지 못합니다.

이 오류를 방지하려면 버전 2.7 또는 3.8과 같은 이전 버전의 Python을 사용하세요.

참고: 대부분의 urllib/SSL 오류를 해결하려면 이전 버전의 Python을 사용하세요.

Error: botocore.exceptions.CredentialRetrievalError

오류 예시:

"botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from cert: Oct 17, 2022 9:38:54 AM com.amazonaws.cloudendure.credentials_provider.SharedMain createAndSaveJks"

이 오류는 Elastic Disaster Recovery를 위한 AWSElasticDisasterRecoveryAgentRole 및 Application Migration Service를 위한 AWSApplicationMigrationAgentRole의 AWS Replication Agent 역할을 수정할 때 발생할 수 있습니다.

이 오류를 해결하려면 AWS Replication Agent 역할이 다음과 같아야 합니다.

애플리케이션 마이그레이션 서비스

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "PrincipalGroup": {
        "AWS": "svc:mgn.amazonaws.com"
      },
      "Action": [
        "sts:AssumeRole",
        "sts:SetSourceIdentity"
      ],
      "Condition": {
        "StringLike": {
          "sts:SourceIdentity": "s-*",
          "aws:SourceAccount": "AWSACCOUNTIDHERE"
        }
      }
    }
  ]
}

탄력적 재해 복구

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "PrincipalGroup": {
        "AWS": "svc:drs.amazonaws.com"
      },
      "Action": [
        "sts:AssumeRole",
        "sts:SetSourceIdentity"
      ],
      "Condition": {
        "StringLike": {
          "aws:SourceAccount": "AWSACCOUNTIDHERE",
          "sts:SourceIdentity": "s-*"
        }
      }
    }
  ]
}

Error: A dependency job for aws-replication.target failed.

오류 예시:

"stderr: A dependency job for aws-replication.target failed. See 'journalctl -xe' for details"

이 오류의 원인은 두 가지일 수 있습니다.

  • /var 디렉터리의 사용 권한이 754입니다.
  • aws-replication 사용자에 대한 Linux 그룹을 만드는 동안 문제가 발생했습니다.

/var 문제를 해결하려면 /var 디렉터리에 대해 chmod 755를 실행합니다.

Linux 그룹 문제를 해결하려면 다음 단계를 완료하세요.

  1. AWS Replication Agent를 제거합니다.

  2. 다음 명령을 실행하여 aws-replication 사용자 및 aws-replication 그룹을 삭제합니다.

    # userdel aws-replication
    # groupdel aws-replication
  3. AWS Replication Agent를 다시 설치합니다.

자세한 정보 및 설치 전제 조건은 다음 AWS 설명서를 참고하세요.

Error: Exception in thread "main" com.amazonaws.services.drs.model.InternalServerException

오류 예시:

"Exception in thread "main" com.amazonaws.services.drs.model.InternalServerException: An unexpected error has occurred (Service: Drs; Status Code: 500; Error Code: InternalServerException; Request ID: 4f4a76cb-aaec-44cc-a07a-c3579454ca55; Proxy: null"

이 오류는 클라이언트가 AWS Security Token Service(AWS STS) 엔드포인트를 해제할 때 발생합니다. STS 엔드포인트가 꺼져 있으면, Application Migration Service 또는 Elastic Disaster Recovery가 AWS STS를 호출하여 클라이언트 계정에서 역할을 맡을 수 없습니다.

이 오류를 해결하려면 클라이언트에서 STS 엔드포인트를 켜세요.

Error: could not insert module ./aws-replication-driver.ko: 필수 키를 사용할 수 없음

이 오류는 OS에 보안 부팅이 켜져 있을 때 발생합니다. 애플리케이션 마이그레이션 서비스와 탄력적 재해 복구는 보안 부팅이 설정된 Linux OS를 지원하지 않습니다.

이 오류를 해결하려면 Linux OS의 보안 부팅을 끄세요. 대부분의 OS에서는 하이퍼바이저의 보안 부팅을 끕니다.

Error: could not insert module ./aws-replication-driver.ko: 메모리를 할당할 수 없음

오류 예시:

"insmod: ERROR: could not insert module ./aws-replication-driver.ko: Cannot allocate memory rmmod: ERROR: Module aws_replication_driver is not currently loaded ] 2023-03-16 10:27:08,416 ERROR Exception during agent installation Traceback (most recent call last): File "cirrus/installer_shared/installer_main.py", line 308, in run_agent_installer_command_linux File "shared/installer_utils/command_utils.py", line 161, in run shared.installer_utils.command_utils.RunException: command: /tmp/tmp_t"

이 오류는 Linux OS에 에이전트 설치에 필요한 메모리가 충분하지 않을 때 발생합니다.

이 오류를 해결하려면 OS에 사용 가능한 메모리가 300MB 이상 있는지 확인하세요.

Error: 에이전트 드라이버를 만드는 중 예상치 못한 오류가 발생했습니다! Are kernel linux headers installed correctly?

오류 예시:

"Unexpected error while making agent driver! Are kernel linux headers installed correctly? Installation returned with code 1Installation failed due to unspecified error:"

에이전트를 설치하면 설치 과정에서 현재 패키지와 일치하는 커널 개발 패키지가 다운로드됩니다. Linux OS에 구성된 패키지 저장소에서 현재 패키지를 찾을 수 있습니다.

이 오류는 에이전트 설치 워크플로에서 일치하는 kernel-devel 패키지를 Linux OS의 실행 중인 커널에 설치할 수 없을 때 발생합니다.

이 오류를 해결하려면 설치 로그를 검토하여 저장소 액세스로 인한 문제인지 확인하세요. 그런 다음 인터넷에서 kernel-devel 패키지를 수동으로 다운로드합니다. 패키지를 다운로드한 후 설치를 다시 실행합니다.

커널 개발 패키지는 다음 웹 사이트에서 다운로드할 수 있습니다.

또한 AWS Replication Agent는 make gcc perl tar gawk rpm과 같이 설치에 필요한 종속성을 설치합니다. 자세한 내용은 Linux 설치 요구 사항을 참조하세요.

AWS 공식
AWS 공식업데이트됨 일 년 전