如何解决 EC2 Windows 实例上的 AWS Replication Agent 安装失败问题?

3 分钟阅读
0

在我运行 Microsoft Windows 的 Amazon Elastic Compute Cloud (Amazon EC2) 实例上,AWS Application Migration Service 或 AWS 弹性灾难恢复的 AWS Replication Agent 安装失败。

简短描述

必须在每台源服务器上为 Application Migration Service 和 Elastic Disaster Recovery 安装 AWS Replication Agent。以下是常见的安装失败错误:

  • CERTIFICATE_VERIFY_FAILED
  • Downloading of path/AwsReplicationInstaller.exe failed
  • ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
  • No permission to install
  • This agent installer is not suitable for the current operating system
  • The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.', None, None) Failed to execute script install_agent_windows
  • Agent installation fails or freezes when using the "--force-volumes" flag to specify disks

解决方法

CERTIFICATE_VERIFY_FAILED

当因缺少 Amazon 根 CA 证书而导致 AWS Replication Agent 安装失败时,就会出现此错误。对 AWS 管理控制台进行身份验证需要 Amazon 根 CA 证书。

要解决此错误,请执行以下操作:

  1. 下载必要的 Amazon 根 CA 证书
  2. 将 Amazon 根 CA 证书导入“可信根证书颁发机构”文件夹(本地计算机)。

有关更多信息,请参阅 Microsoft 文档网站上的安装可信根证书

Downloading of path/AwsReplicationInstaller.exe failed

此错误表示在连接到以下端点时源实例出现网络错误:

要解决连接错误,请打开 PowerShell 并在端口 443 中对所需端点执行 Test-NetConnection,如下例所示:

Test-NetConnection mgn.us-east-1.amazonaws.com -Port 443

**注意:**如果您的本地网络未向上述端点列表开放,则可以使用 PrivateLink 安装 AWS Replication Agent。此外,本地环境与所需端点之间的任何代理都必须在环境变量下配置。

ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

此错误表示客户端无法与弹性灾难恢复端点握手。如果客户端尝试执行 TLS 1.0 连接,则与弹性灾难恢复端点的握手会失败。大多数 AWS 端点只能使用 TLS 1.2 协议。

要解决此错误,请执行以下操作:

  1. 确保服务器和客户端子键已启用 TLS 1.2。
  2. 确保通过注册表关闭 TLS1.0、TLS1.1 和其他 SSL 版本。
  3. 重新启动服务器并再次尝试安装。

有关更多信息,请参阅 Oracle 文档网站上的为 TLS 1.2 配置注册表设置

No permission to install

当尝试安装 AWS Replication Agent 的用户缺少管理员域权限时,可能会出现此错误。如果防病毒软件阻止了安装过程,也可能出现此错误。

要解决此错误,请执行以下操作:

  1. 使用管理员权限打开命令提示窗口或 PowerShell。
  2. C:\Program Files (x86)\AWS Replication Agent\ 添加到防病毒软件的允许列表目录中。
    **注意:**您可以暂时关闭防病毒软件,并测试安装以确定安装是否被阻止。

This agent installer is not suitable for the current operating system

出现此错误可能是由于为当前源计算机操作系统安装了错误的代理。Microsoft Windows Server 版本 2003、2003 R2 和 2008(2008 R2 除外)使用特别版 AWS Replication Agent。该版本仅对旧版 Windows 操作系统(AwsReplicationWindowsLegacyInstaller.exe)有效。下载位置是https://aws-application-migration-service-region.s3.amazonaws.com/latest/windows_legacy/AwsReplicationWindowsLegacyInstaller.exe

注意:region替换为您要复制到的 AWS 区域。

Agent installation failed with "Unexpected Error"

此错误可能是由于凭证无效或用户凭证缺少必要权限造成的。

要解决此错误,请确保 AWS Identify and Access Management(IAM)角色存在并附加了正确的策略。有关更多信息,请参阅以下内容:

如果权限正确但您仍然收到错误,请查看安装日志进一步解决问题。安装日志位于install_path\aws_replication_agent_installer.log中。

The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.', None, None) Failed to execute script install_agent_windows

AWS Replication Agent 依赖于 Windows Management Instrumentation(WMI)服务。WMI 是基于 Windows 的操作系统上的管理数据和操作的基础架构。

以下是显示Failed to execute脚本错误的失败日志示例:

Traceback (most recent call last):
  File "install_agent_windows.py", line 28, in <module>
  File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
  File "installer_utils\__init__.py", line 5, in <module>
  File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
  File "installer_utils\cloud_utils.py", line 34, in <module>
  File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
  File "installer_utils\instance_id_utils.py", line 41, in <module>
  File "c:\python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
  File "site-packages\wmi.py ", line 157, in <module>
  File "site-packages\win32com\client\__init__.py", line 72, in GetObject
  File "site-packages\win32com\client\__init__.py", line 87, in Moniker
pywintypes.com_error: (-2147023838, 'The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.', None, None)
Failed to execute script install_agent_windows"

要解决此错误,请在源计算机上打开 WMI 服务。有关更多信息,请参阅以下内容:

Agent installation fails or freezes when using the "--force-volumes" flag to specify disks

如果磁盘的描述顺序不正确,则尝试安装时可能会出现此错误。调用 --force-volumes 标记时,将根磁盘列为第一个磁盘,如下例所示:

installer_windows.exe --no-prompt --force-volumes -t <TOKEN> --drives="\\?\PhysicalDisk1,\\?\PhysicalDisk2,\\?\PhysicalDisk3,\\?\PhysicalDisk4"

注意: 使用 PowerShell 中的wmic diskdrive list brief命令来查找磁盘名称。

相关信息

对代理问题进行故障排除

AWS 官方
AWS 官方已更新 1 年前