내용으로 건너뛰기

Linux 서버의 AWS Replication Agent 설치 실패 문제를 해결하려면 어떻게 해야 합니까?

6분 분량
0

AAWS Application Migration Service 또는 AWS Elastic Disaster Recovery용 AWS Replication Agent를 설치하고 싶은데 설치에 실패했습니다.

해결 방법

Linux 소스 서버에 Application Migration Service 또는 Elastic Disaster Recovery 복제 에이전트를 설치할 때 발생하는 문제를 자동으로 식별하려면 AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 자동화 런북을 사용하십시오. 이 런북은 AWS Replication Agent 설치 로그 파일을 사용하여 탐지된 오류의 목록과 해결 방법을 제공합니다.

AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 런북을 시작하기 전에 AWS Identify and Access Management(IAM) 사용자 또는 역할에 필요한 권한이 있는지 확인하십시오. 자세한 내용은 AWSSupport-TroubleshootLinuxMGNDRSAgentLogs필수 IAM 권한을 참조하십시오. 또한 installer-path/aws_replication_agent_installer.log 복제 에이전트 로그 파일을 Amazon Simple Storage Service(Amazon S3) 버킷에 업로드하십시오.

AWSSupport-TroubleshootLinuxMGNDRSAgentLogs를 실행하려면 AWSSupport-TroubleshootLinuxMGNDRSAgentLogs설명을 참조하십시오.

**ServiceName(필수)**에 대해 다음과 같은 입력 파라미터를 구성합니다.

  • Application Migration Service를 사용하려면 AWS MGN을 선택합니다.
  • Elastic Disaster Recovery를 사용하려면 AWS DRS를 선택합니다.

또는 다음 명령을 실행하여 AWS Replication Agent 설치 오류를 수동으로 식별합니다.

less +G installer-path/aws_replication_agent_installer.log

참고: installer-path를 복제 에이전트를 설치하는 데 사용된 경로로 바꾸십시오.

식별한 오류에 따라 다음 문제 해결 단계를 사용하여 문제를 해결하십시오.

‘failed to map segment from shared object: Operation not permitted’ 오류

설치 스크립트는 /tmp 디렉터리를 사용합니다. /tmpnoexec을 설정하면 libz.so가 세그먼트를 매핑할 수 없으며 다음과 같은 오류 메시지가 표시됩니다.

"error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted"

이 문제를 해결하려면 다음 명령을 실행하여 실행 권한으로 볼륨을 탑재하십시오.

# sudo mount /tmp -o remount,exec

/tmp 디렉터리에서 noexec을 제거하지 않으려면 명령에 다음 환경 변수를 추가하십시오.

TMPDIR='my_temp_dir' AGENT INSTALLATION COMMAND

참고: my_temp_dirnoexec이 없는 디렉터리로 바꾸고 AGENT INSTALLATION COMMAND를 에이전트를 설치하는 데 사용하는 명령으로 바꾸십시오.

명령 예시:

TMPDIR='temp1' sudo chmod +x aws-replication-installer-init; sudo ./aws-replication-installer-init

‘security token included in the request is expired’ 오류

IAM 역할이 만료되면 Application Migration Service 또는 Elastic Disaster Recovery 엔드포인트에 대한 API 호출이 실패하고 다음과 같은 오류 메시지가 표시됩니다.

"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]"

이 문제를 해결하려면 임시 보안 자격 증명을 요청하여 새 토큰을 생성하십시오. 또는 Application Migration Service 또는 Elastic Disaster Recovery의 액세스 키 또는 시크릿 액세스 키를 사용하여 역할을 설치합니다.

‘ssl.SSLCertVerificationError’ 오류

Python 3.10 이상이 있는 이전 운영 체제(OS) 버전을 사용하는 경우 다음과 같은 오류 메시지가 표시될 수 있습니다.

"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"

이전 OS 버전에는 Python 3.10을 지원하는 최신 OpenSSL 라이브러리가 없습니다. 자세한 내용은 Python Enhancement Proposals 웹 사이트의 PEP 644 -- OpenSSL 1.1.1 이상 필요를 참조하십시오. 이 시나리오에서는 AWS Replication Agent 설치가 Application Migration Service 또는 Elastic Disaster Recovery 엔드포인트에 대한 SSL 인증서를 확인할 수 업습니다.

이 문제를 방지하려면 버전 2.7 또는 3.8과 같은 이전 버전의 Python을 사용하십시오.

참고: 대부분의 ‘urllib’ 또는 ‘SSL’ 오류를 해결하려면 이전 버전의 Python을 사용하십시오.

‘botocore.exceptions.CredentialRetrievalError’ 오류

AWSElasticDisasterRecoveryAgentRole 또는 AWSApplicationMigrationAgentRole IAM 서비스 역할을 수정하면 다음과 같은 오류 메시지가 표시됩니다.

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

이 문제를 해결하려면 사용하는 서비스에 따라 IAM 서비스 역할에 대한 권한 정책을 업데이트하십시오.

Application Migration Service 권한 정책:

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

참고: AWS-Account-Number를 AWS 계정 ID로 바꾸십시오.

Elastic Disaster Recovery 권한 정책:

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

참고: AWS-Account-Number를 계정 ID로 바꾸십시오.

‘A dependency job for aws-replication.target failed’ 오류

/var 디렉터리에 754 권한이 있거나 aws-replication 사용자에 대한 Linux 그룹을 만들 때 문제가 발생한 경우 다음 오류 메시지가 표시됩니다.

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

/var 문제를 해결하려면 다음 명령을 실행합니다.

sudo chmod 755 /var

Linux 그룹 문제를 해결하려면 다음 단계를 완료하십시오.

  1. Application Migration Service 또는 Elastic Disaster Recovery용 AWS Replication Agent를 제거합니다.

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

    sudo userdel aws-replication
    sudo groupdel aws-replication
  3. Application Migration Service 또는 Elastic Disaster Recovery용 AWS Replication Agent를 다시 설치합니다.

Application Migration Service의 설치 사전 요구 사항은 설치 요구 사항을 참조하십시오. Elastic Disaster Recovery의 경우 AWS Replication Agent의 설치 요구 사항을 참조하십시오.

‘Exception in thread "main" com.amazonaws.services.drs.model.InternalServerException’ 오류

AWS Security Token Service(AWS STS) 엔드포인트를 비활성화하면 다음과 같은 오류 메시지가 표시됩니다.

"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"

이 오류는 Application Migration Service 및 Elastic Disaster Recovery가 AWS STS를 호출하여 클라이언트 계정에서 역할을 수임하기 때문에 발생합니다. 이 문제를 해결하려면 클라이언트에서 STS 엔드포인트를 활성화하십시오.

‘could not insert module ./aws-replication-driver.ko:’ 오류

소스 서버에서 SecureBoot를 활성화한 경우 다음 오류 메시지 중 하나가 표시됩니다.

"insmod: ERROR: could not insert module ./aws-replication-driver.ko: Required key not available"

-또는-

"insmod: ERROR: could not insert module ./aws-replication-driver.ko: Key was rejected by service"

Application Migration Service 또는 Elastic Disaster Recovery가 있는 Linux OS에서는 SecureBoot를 사용할 수 없습니다.

이 문제를 해결하려면 Linux OS용 SecureBoot를 비활성화하십시오.

참고: 일반적으로 하이퍼바이저를 사용하여 SecureBoot를 비활성화합니다.

SecureBoot 상태를 확인하려면 다음 명령을 실행합니다.

sudo mokutil --sb-state

‘could not insert module ./aws-replication-driver.ko: Cannot allocate memory’ 오류

Linux OS에 메모리가 부족하여 에이전트를 설치할 수 없는 경우 다음과 같은 오류 메시지가 표시됩니다.

"insmod: ERROR: could not insert module ./aws-replication-driver.ko: Cannot allocate memory"

이 문제를 해결하려면 설치를 실행할 때 OS에 최소 300MB의 여유 메모리가 있는지 확인하십시오. 이 문제는 메모리 조각화로 인해 발생할 수 있습니다. 메모리 조각화 문제를 해결하려면 소스 서버를 재부팅합니다. 또한 Falcon, Trend Micro, SentinelOne 또는 McAfee와 같은 보안 또는 바이러스 백신 소프트웨어가 에이전트 설치를 차단할 수 있는 메모리 또는 커널 보호를 유발하는지 확인하십시오.

‘Unexpected error while making agent driver! ‘, ‘Kernel development package ...missing from repositories’ 또는 ‘Kernel development or header package...did not install’ 오류

에이전트를 설치하면 설치 과정에서 현재 실행 중인 커널 패키지와 일치하는 kernel-devel 패키지가 다운로드됩니다. Linux OS에 구성된 패키지 리포지토리에서 현재 패키지를 찾을 수 있습니다. 에이전트 설치 시 Linux OS에서 실행 중인 커널에 kernel-devel 패키지를 설치할 수 없는 경우 다음 오류 메시지 중 하나가 표시됩니다.

"Unexpected error while making agent driver! Are kernel linux headers installed correctly?"

-또는-

"Kernel development package for '************' are missing from repositories"

-또는-

"Kernel development or header package for ************ did not install"

이 문제를 해결하려면 설치 로그를 검토하여 리포지토리 액세스 문제를 확인하십시오.

그런 다음, 배포에 따라 kernel-devel 패키지를 검색하여 수동으로 다운로드합니다.

  • Red Hat Enterprise Linux(RHEL), CentOS, Oracle 및 SUSE 패키지 디렉터리의 경우 RPM 웹 사이트의 검색을 참조하십시오.
  • Debian의 경우 Debian 웹 사이트의 패키지를 참조하십시오.
  • Ubuntu의 경우 Ubuntu 패키지 웹 사이트의 Ubuntu 패키지 검색을 참조하십시오.

패키지를 다운로드한 후 설치를 다시 실행합니다. 또한 AWS Replication Agent는 make gcc perl tar gawk rpm과 같이 설치에 필요한 종속성을 설치합니다. 자세한 내용은 Linux 설치 요구 사항을 참조하십시오.

관련 정보

에이전트 문제 해결

Elastic Disaster Recovery 문제 해결

문제 해결(Application Migration Service)