Get Hands-on with Amazon EKS - Workshop Event Series
Whether you're taking your first steps with Kubernetes or you're an experienced practitioner looking to sharpen your skills, our Amazon EKS workshop series delivers practical, real-world experience that moves you forward. Learn directly from AWS solutions architects and EKS specialists through hands-on sessions designed to build your confidence with Kubernetes. Register now and start building with Amazon EKS!
如何對 Windows 伺服器上的 AWS 複寫代理程式安裝失敗問題進行疑難排解?
AWS Application Migration Service 或 AWS Elastic Disaster Recovery 的 AWS 複寫代理程式安裝失敗。我使用執行 Microsoft Windows 的 Amazon Elastic Compute Cloud (Amazon EC2) 執行個體,或執行 Windows Server 的內部部署機器。
簡短說明
您必須在每個來源伺服器上安裝 AWS Replication Agent,以使用 Application Migration Service 和 Elastic Disaster Recovery。您可能會遇到以下安裝失敗錯誤:
- 「CERTIFICATE_VERIFY_FAILED」
- 「Downloading of path/AwsReplicationInstaller.exe failed.」
- 「ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host {change」
- 「invoke-webrequest : The underlying connection was closed: An unexpected error occurred on a send.」
- 「No permission to install」
- 「This agent installer is not suitable for the current operating system」
- 「Agent installation failed with "Unexpected Error"」
- 「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 of freezes when using the "--force-volumes" flag to specify disks」
- 「[WinError 740] The requested operation requires elevation」
- 「MissingDotNetVersionException」
- 「UninitializedAccountException」
- 「AccessDeniedException」
解決方法
根據您收到的錯誤,採取以下疑難排解動作。
「CERTIFICATE_VERIFY_FAILED」
當 AWS Replication Agent,因沒有 Amazon 根憑證認證機構 (CA) 憑證而安裝失敗時,就會出現此錯誤。您必須具有 Amazon 根 CA 憑證才能透過 AWS 管理主控台進行驗證。
若要解決此錯誤,請完成以下步驟:
- 下載 Amazon 根 CA 憑證。
- 將 Amazon 根 CA 憑證匯入信任的根憑證認證機構資料夾。如需指示,請參閱 Microsoft 網站上的 安裝信任的根憑證。
「Downloading of path/AwsReplicationInstaller.exe failed」
此錯誤表示來源執行個體在連線至下列必要服務端點時,發生網路錯誤:
- Amazon Simple Storage Service (Amazon S3) 端點
- Application Migration Service 端點
- Elastic Disaster Recovery 端點
若要對連線錯誤進行疑難排解,請開啟 PowerShell,然後執行以下命令來測試與每個端點的 443 連接埠 連線。
Amazon S3:
Test-NetConnection s3.us-east-1.amazonaws.com -Port 443
Application Migration Service:
Test-NetConnection mgn.us-east-1.amazonaws.com -Port 443
Elastic Disaster Recovery:
Test-NetConnection drs.us-east-1.amazonaws.com -Port 443
**注意:**將 us-east-1 替換為您用於 Application Migration Service 或 Elastic Disaster Recovery 的 AWS 區域。
您還必須為內部部署環境與 Application Migration Service 或 Elastic Disaster Recovery 所需的端點之間設定所有 Proxy。
如果您的內部部署網路未對必要的服務端點開放,請使用 AWS PrivateLink 為 Application Migration Service 或 Elastic Disaster Recovery 安裝代理程式。
「ConnectionResetError: [WinError 10054]」或「invoke-webrequest : The underlying connection was closed」
當用戶端無法與 Application Migration Service 或 Elastic Disaster Recovery 服務端點進行交握時,就會發生此錯誤。當用戶端嘗試使用 TLS 1.0 或 TLS 1.1 連線時,就會出現此問題。大多數 AWS 端點僅支援 TLS 1.2 通訊協定。
若要解決此問題,請執行下列動作:
- 啟用伺服器與用戶端子機碼的 TLS 1.2。
- 透過登錄檔停用 TLS 1.0、TLS 1.1 和其他 SSL 版本。
如需指示,請參閱 Oracle 網站上的設定 TLS 1.2 的登錄檔設定。
變更 TLS 設定後,請重新啟動伺服器,然後重試安裝。
當您使用 Invoke-WebRequest 下載代理程式安裝程式時,如果使用過時的安全通訊協定,就會出現錯誤。當目標端點需要 TLS 1.2,而用戶端的指令碼或工作階段未強制執行該通訊協定時,就會發生此問題。
若要強制使用 TLS 1.2,請執行以下命令:
[System.Net.ServicePointManager]::SecurityProtocol = 'TLS12'
然後重試安裝。
「No permission to install」
當安裝 AWS Replication Agent 的使用者沒有系統管理員網域權限時,就會出現此錯誤。如果防毒軟體封鎖安裝,也會出現此錯誤。
若要解決此錯誤,請執行下列動作:
- 以系統管理員身分開啟命令提示字元或 PowerShell。
- 將 *C:\Program Files (x86)\AWS Replication Agent* 新增至防毒軟體的允許清單目錄。
**注意:**若要檢查防毒軟體是否封鎖安裝,請在安裝 AWS Replication Agent 時暫時停用防毒軟體。
「This agent installer is not suitable for the current operating system」
當您為目前來源機器的作業系統 (OS) 安裝錯誤版本的 AWS Replication Agent 時,就會出現此錯誤。Windows Server 2003、2003 R2、2008、2008 R2、2012 和 2012 R2 版本使用僅適用於舊版 Windows OS 的有效唯一代理程式版本。
對於 2003、2003 R2、2008、2008 R2,請使用 AwsReplicationWindowsLegacyInstaller.exe 安裝程式。
對於 2012 和 2012 R2,請使用 AwsReplicationWindows2012LegacyInstaller.exe 安裝程式。
如需更多資訊,請參閱在 Windows 伺服器上安裝 AWS Replication Agent。
「Agent installation failed with "Unexpected Error"」
當您使用無效的憑證,或使用者憑證缺少必要權限時,就會出現此錯誤。
若要解決此錯誤,請確保您使用的 AWS Identity and Access Management (IAM) 角色存在於您的 AWS 帳戶中。同時確認該角色擁有 Application Migration Service 或 Elastic Disaster Recovery 所需的政策。
如果權限正確但您仍收到錯誤訊息,請檢閱安裝日誌以進一步對問題進行疑難排解。您可在 install_path\aws_replication_agent_installer.log 檔案路徑中找到安裝日誌。
「The service cannot be started...Failed to execute script install_agent_windows」
若要使用 AWS Replication Agent,您必須啟用 Windows Management Instrumentation (WMI) 服務。如果 WMI 無法如預期運作,您會在日誌中收到類似於以下範例的錯誤訊息:
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 服務。如需指示,請參閱 Microsoft 網站上的設定遠端 WMI 連線。如需有關 WMI 的更多資訊,請參閱 Microsoft 網站上的 Windows Management Instrumentation。
「Agent installation fails or freezes when using the "--force-volumes" flag to specify disks」
當您沒有依照正確順序描述磁碟時,就會出現此錯誤。使用 --force-volumes 旗標時,必須先列出根磁碟。在以下命令範例中,PhysicalDisk1 為根磁碟:
AwsReplicationWindowsInstaller.exe --region destination-region --aws-access-key-id your-access-key --aws-secret-access-key your-secret-access-key --force-volumes --drives=\\.\PHYSICALDRIVE1,\\.\PHYSICALDRIVE0 --no-prompt
**注意:**將 destination-region 替換為目的地區域。同時,將 your-access-key 替換為您用來安裝代理程式的存取金鑰,並將 your-secret-access-key 替換為您用來安裝代理程式的私密存取金鑰。如需建立存取金鑰和私密金鑰的相關資訊,請參閱產生所需的 AWS 憑證 (Application Migration Service) 或 產生所需的 AWS 憑證 (Elastic Disaster Recovery)。
若要檢查您的磁碟名稱,請執行以下命令:
wmic diskdrive list brief
「[WinError 740] The requested operation requires elevation」
當沒有系統管理員權限的使用者嘗試安裝軟體時,就會出現此錯誤。您必須具有系統管理員權限才能安裝並使用 AWS Replication Agent。
若要以系統管理員權限執行代理程式安裝檔,請在 AWSReplicationWindowsInstaller.exe 上按滑鼠右鍵開啟內容功能表,然後選取 Run as Administrator (以系統管理員身分執行)。
「MissingDotNetVersionException」
如果您在代理程式安裝日誌中看到「MissingDotNetVersionException」,表示伺服器缺少必要的 .NET Framework。
若要解決此問題,請執行下列動作:
-
如果您使用 Windows Server 2008 R2 或更新版本,請確保伺服器上已安裝 .NET Framework 4.5 版或更新版本。如需指示,請參閱 Microsoft 網站上的 操作指南: 判斷已安裝的 .NET Framework 版本。
-
若要檢查 .NET Framework 版本,請執行以下命令來檢查所需的登錄機碼:
reg query "HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v4\full" reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full" /v "Release" -
確認您的群組政策未封鎖 .NET 安裝,或對所需登錄機碼的查詢。
「UninitializedAccountException」
如果您尚未使用 Application Migration Service 或 Elastic Disaster Recovery 初始化帳戶,就會出現此錯誤。如果帳戶未使用預設複寫範本,也會發生此錯誤。
複寫設定會決定服務將資料從來源伺服器複寫到 AWS 的方法。您必須為 Application Migration Service 或 Elastic Disaster Recovery 設定這些設定,然後再安裝代理程式。
「AccessDeniedException」
此問題是由於缺少權限所導致。請確認您已將具有必要權限的 IAM 政策,附加至您用來安裝代理程式的 IAM 角色或使用者。
對於 Application Migration Service,請附加 AWSApplicationMigrationAgentInstallationPolicy。如果您的來源伺服器是 Amazon Elastic Compute Cloud (Amazon EC2) 執行個體,請附加 AWSApplicationMigrationServiceEc2InstancePolicy。
如需 Application Migration Service 權限的詳細資訊,請參閱產生所需的 AWS 憑證。
對於 Elastic Disaster Recovery,請附加 AWSElasticDisasterRecoveryAgentInstallationPolicy。如果您的來源是 Amazon EC2 執行個體,請附加 AWSElasticDisasterRecoveryEc2InstancePolicy。
如需 Elastic Disaster Recovery 權限的詳細資訊,請參閱產生所需的 AWS 憑證。
同時,請確保服務控制政策 (SCP) 未封鎖或拒絕 Application Migration Service 或 Elastic Disaster Recovery 所需的 API 動作。
相關資訊
相關內容
- 已提問 1 年前
- 已提問 1 年前
