Linux サーバーに AWS Replication Agent をインストールできない場合のトラブルシューティング方法を教えてください。
AWS 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 Identity 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 Recover を使用する場合は、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 (共有ライブラリのロード時にエラーが発生しました。共有オブジェクトのセグメントをマッピングできません)」
このエラーを解決するには、次のコマンドを実行し、実行権限を持つボリュームをマウントします。
# sudo mount /tmp -o remount,exec
/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」error
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」エラー
古いオペレーティングシステム (OS) バージョンで Python 3.10 以降を使用している場合、次のエラーメッセージが表示される可能性があります。
「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 を使用してください。
注: 古いバージョンの Python を使用すると、ほとんどの「urllib」エラーまたは「SSL」エラーは解決されます。
「botocore.exceptions.CredentialRetrievalError」エラー
IAM サービスロール AWSElasticDisasterRecoveryAgentRole または AWSApplicationMigrationAgentRole を変更すると、次のエラーメッセージが表示されます。
「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: aws-replication.target の依存関係ジョブが失敗しました。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 に 300 MB 以上の空きメモリを確保してください。この問題は、メモリの断片化が原因で発生する可能性があります。メモリ断片化の問題を解決するには、ソースサーバーを再起動します。さらに、Falcon、Trend Micro、SentinelOne、McAfee などのセキュリティソフトウェアまたはウイルス対策ソフトウェアが行うメモリまたはカーネルの保護により、エージェントのインストールがブロックされていないか確認してください。
「Unexpected error while making agent driver! ", "Kernel development package ...missing from repositories", or "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? (カーネルの Linux ヘッダーが正しくインストールされているかどうかを確認してください)」
または、
「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)
関連するコンテンツ
- 質問済み 4ヶ月前
