Linux 서버에서 발생한 AWS Replication Agent 설치 실패 문제를 해결하려면 어떻게 해야 합니까?
AWS Application Migration Service 또는 AWS Elastic Disaster Recovery를 위한 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) 버킷에 업로드하십시오.
Linux 소스 서버에서 발생하는 Application Migration Service 또는 Elastic Disaster Recovery 복제 에이전트 설치 문제를 자동으로 식별하려면 AWSSupport-TroubleshootLinuxMGNDRSAgentLogs 자동화 런북을 사용하십시오. 이 런북은 AWS Replication Agent 설치 로그 파일을 사용하여 탐지된 오류의 목록과 해결 방법을 제공합니다.
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 디렉터리를 사용합니다. /tmp에 noexec을 설정하면 libz.so가 세그먼트를 매핑할 수 없으며 다음과 같은 오류 메시지가 표시됩니다.
"error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted"
이 문제를 해결하려면 다음 명령을 실행하여 exec 권한으로 용량을 마운트하십시오.
sudo mount /tmp -o remount,exec
그런 다음, Application Migration Service 또는 Elastic Disaster Recovery를 위한 AWS Replication Agent를 재설치하십시오.
설치를 완료한 후 다음 명령을 실행하여 noexec이 활성화된 상태로 서버를 복원합니다.
sudo mount /tmp -o remount,noexec
/tmp 디렉터리에서 noexec을 제거하지 않으려면 명령에 다음 환경 변수를 추가하십시오.
TMPDIR='my_temp_dir' AGENT INSTALLATION COMMAND
참고: my_temp_dir을 noexec이 없는 디렉터리로 바꾸고 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
이 문제는 Python 3.10 이상 버전에서는 OpenSSL 1.1.1 이상 버전이 필요하기 때문에 발생합니다. 이전 OS 버전에서는 오래된 OpenSSL 버전을 제공하므로 Python이 정상적인 SSL 모듈을 구축할 수 없습니다. 그 결과, AWS Replication Agent가 Application Migration Service 또는 Elastic Disaster Recovery 엔드포인트에 대한 SSL 인증서를 검증하지 못합니다. 자세한 내용은 Python Enhancement Proposals 웹 사이트의 PEP 644 -- OpenSSL 1.1.1 또는 최신 버전(필수)를 참조하십시오.
이 문제를 해결하려면 다음 단계를 완료하여 OS를 업데이트하십시오.
-
인증 기관(CA)의 인증서 번들을 새로 고침하려면 Linux 배포판에 따라 다음 명령을 실행하십시오.
Amazon Linux, Red Hat Enterprise Linux(RHEL), CentOS, Oracle, Rocky, AlmaLinux:sudo yum install -y ca-certificates && sudo update-ca-trustSUSE 및 SUSE Linux Enterprise Server(SLES):
sudo zypper install -y ca-certificates && sudo update-ca-certificatesDebian 및 Ubuntu:
sudo apt-get update && sudo apt-get install -y ca-certificates && sudo update-ca-certificates -
다음 명령을 실행하여 Python이 사용하는 OpenSSL 버전을 확인합니다.
python3 -c "import ssl; print(ssl.OPENSSL_VERSION)"참고: SLES에서는 OpenSSL 버전이 Python의 실제 사용 버전보다 최신 버전을 보고할 수 있습니다. 올바른 버전을 식별하려면 Python 값을 확인하십시오.
-
배포 리포지토리가 OpenSSL 1.1.1 이상 버전을 제공하지 않는 경우 4단계로 진행하십시오.
참고: Amazon Linux 2(AL2) 인스턴스의 경우 4단계로 진행하십시오. AL2의 OpenSSL의 최신 버전은 1.0.2입니다. AL2는 2026년 6월 30일에 단종됩니다. AL2 인스턴스를 Amazon Linux 2023(AL2023)으로 마이그레이션하는 것을 권장합니다.
배포 리포지토리가 OpenSSL 1.1.1 이상 버전을 제공하는 경우, 패키지 관리자를 통해 OpenSSL 버전을 업데이트하십시오. 배포판에 따라 다음 명령을 실행하십시오.
RHEL, CentOS, Oracle, Rocky, AlmaLinux:sudo yum update -y openssl openssl-libs참고: AL2023 및 dnf 기반 기타 Linux 배포판의 경우, yum을 dnf로 바꾸십시오.
SUSE 및 SLES:sudo zypper --non-interactive update openssl libopenssl1_1 libopenssl3Debian 및 Ubuntu:
sudo apt-get update && sudo apt-get install --only-upgrade -y openssl libssl3참고: OpenSSL 1.1.1을 제공하는 Debian 및 Ubuntu 배포판의 경우 libssl3을 libssl1.1로 바꾸십시오.
-
OS 버전을 OpenSSL 1.1.1 이상 버전을 제공하는 최신 버전으로 업데이트하십시오.
-
Application Migration Service 또는 Elastic Disaster Recovery를 위한 AWS Replication Agent를 재설치하십시오.
중요: OpenSSL 버전 요구 사항을 우회하기 위해 Python 2.7 또는 3.8 버전으로 다운그레이드하지 마십시오. 이 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": "123456789012" } } } ] }
참고: 123456789012를 사용자의 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": "123456789012" } } } ] }
참고: 123456789012를 사용자의 계정 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 그룹 문제를 해결하려면 다음 단계를 완료하십시오.
-
Application Migration Service 또는 Elastic Disaster Recovery를 위한 AWS Replication Agent를 제거합니다.
-
다음 명령을 실행하여 aws-replication 사용자 및 aws-replication 그룹을 삭제합니다.
sudo userdel aws-replication sudo groupdel aws-replication -
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의 여유 메모리가 있는지 확인하십시오. 이 문제는 메모리 단편화로 인해 발생할 수 있습니다. 메모리 단편화 문제를 해결하려면 소스 서버를 재부팅하십시오. 또한 보안 또는 바이러스 백신 소프트웨어가 메모리 또는 커널을 보호하기 위해 에이전트 설치를 차단하는지 확인하십시오.
"Unexpected error while making agent driver! ", "Kernel development package ...missing from repositories", 또는 "Kernel development or header package...did not install" 오류 해결
사전 요구 사항: Linux 설치 요구 사항을 충족하는지 확인하십시오.
커널 헤더 또는 개발 버전이 실행 중인 커널과 동일한 버전이어야 AWS Replication Agent가 드라이버를 구축할 수 있습니다. 에이전트가 실행 중인 커널의 패키지를 찾거나 설치할 수 없는 경우, 다음 오류 메시지 중 하나가 표시됩니다.
"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"
이 문제를 해결하려면 다음 단계를 완료하십시오.
-
설치 로그에서 리포지토리 비활성화, 리포지토리에 대한 네트워크 경로 없음 등 리포지토리 액세스 문제가 발생했는지 확인하십시오.
-
다음 명령을 실행하여 실행 중인 커널 버전을 확인하십시오.
uname -r -
kernel-devel 또는 linux-headers 콘텐츠가 포함된 폴더가 심볼릭 링크인 경우 해당 링크를 제거하십시오.
-
적절한 패키지 버전을 설치하려면 배포판에 맞게 다음 명령을 실행하십시오.
AL2, RHEL, CentOS, Rocky, AlmaLinux, Oracle:sudo yum install -y kernel-devel-$(uname -r)참고: AL2023 및 기타 dnf 기반 Linux 배포판의 경우, yum을 dnf로 바꾸십시오.
Unbreakable Enterprise Kernel(UEK)을 실행하는 Oracle Linux:sudo yum install -y kernel-uek-devel-$(uname -r)SUSE 및 SLES:
sudo zypper install -y kernel-default-devel-$(uname -r)참고: 위 명령은 기본 커널 유형를 사용합니다. 다른 커널 유형의 경우 default를 커널 유형 이름으로 바꾸십시오.
Debian 및 Ubuntu:sudo apt-get update && sudo apt-get install -y linux-headers-$(uname -r) -
실행 중인 커널과 일치하는 패키지가 없는 경우, 패키지를 수동으로 다운로드하십시오. 또는 배포판에 맞춰 사용 가능한 패키지 버전으로 커널을 업그레이드하십시오.
RHEL, CentOS, Oracle 및 SUSE 패키지 디렉토리의 경우, 배포판의 패키지 설명서를 확인하십시오.
Debian의 경우, Debian 웹 사이트의 패키지를 참조하십시오.
Ubuntu의 경우 Ubuntu 패키지 웹 사이트의 Ubuntu 패키지 검색을 참조하십시오. -
Application Migration Service 또는 Elastic Disaster Recovery를 위한 AWS Replication Agent를 재설치하십시오.
관련 정보
Elastic Disaster Recovery 문제 해결
문제 해결(Application Migration Service)
This article was reviewed and updated on 2026-09-02.
