

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 已知問題
<a name="res-troubleshooting-known-issues"></a>
+ [2024.x 已知問題](#res-troubleshooting-known-issues-2024x)
  + [(2024.12 和 2024.12.01) 註冊新 Cognito 使用者時發生 Regex 失敗](#res-troubleshooting-known-issues-2024x-regex-failure-cognito)
  + [(2024.12.01 及更早版本） 使用自訂網域連線至 VDI 時出現無效的憑證錯誤](#res-troubleshooting-known-issues-2024x-invalid-bad-cert)
  + [(2024.12 和 2024.12.01) Active Directory 使用者無法 SSH 到堡壘主機](#res-troubleshooting-known-issues-2024x-ad-users-cannot-ssh)
  + [(2024.10) 針對部署在隔離 VPCs 中的 RES 環境，VDI 自動停止中斷](#res-troubleshooting-known-issues-2024x-vdi-auto-stop-broken)
  + [(2024.10 及更早版本） 無法啟動 VDI for Graphic 增強型執行個體類型](#res-troubleshooting-known-issues-2024x-fail-to-launch-vdi)
  + [(2024.08) 準備基礎設施 AMI 失敗](#res-troubleshooting-known-issues-2024x-prep-infra-ami-fail)
  + [(2024.08) 虛擬桌面無法掛載具有根儲存貯體 ARN 和自訂字首的讀取/寫入 Amazon S3 儲存貯體](#res-troubleshooting-known-issues-2024x-vdi-fails-to-mount-s3)
  + [(2024.06) 當 AD 群組名稱包含空格時，套用快照失敗](#res-troubleshooting-known-issues-2024x-apply-snapshot-fails)
  + [(2024.06 及更早版本） AD 同步期間未同步至 RES 的群組成員](#res-troubleshooting-known-issues-2024x-group-not-synced)
  + [(2024.06 及更早版本） CVE-2024-6387、RegreSSHion、RHEL9 和 Ubuntu VDIs中的安全漏洞](#res-troubleshooting-known-issues-2024x-regresshion)
  + [(2024.04-2024.04.02) 提供未連接至 VDI 執行個體角色的 IAM 許可界限](#res-troubleshooting-known-issues-2024x-iam-boundary)
  + [(2024.04.02 及更早版本） ap-southeast-2 （雪梨） 中的 Windows NVIDIA 執行個體無法啟動](#res-troubleshooting-known-issues-2024x-nvidia-instances)
  + [(2024.04 和 2024.04.01) GovCloud 中的 RES 刪除失敗](#res-troubleshooting-known-issues-2024x-delete-fail)
  + [(2024.04 - 2024.04.02) 重新啟動時，Linux 虛擬桌面可能卡在「繼續」狀態](#res-troubleshooting-known-issues-2024x-linux-stuck-resuming)
  + [(2024.04.02 及更早版本） 無法同步 SAMAccountName 屬性包含大寫字母或特殊字元的 AD 使用者](#res-troubleshooting-known-issues-2024x-samaccountname)
  + [(2024.04.02 及更早版本） 用於存取堡壘主機的私有金鑰無效](#res-troubleshooting-known-issues-2024x-private-key)

## 2024.x 已知問題
<a name="res-troubleshooting-known-issues-2024x"></a>

........................

### (2024.12 和 2024.12.01) 註冊新 Cognito 使用者時發生 Regex 失敗
<a name="res-troubleshooting-known-issues-2024x-regex-failure-cognito"></a>

**錯誤描述**

如果您嘗試透過 Web 入口網站註冊電子郵件字首包含 "." 的 AWSCognito 使用者，例如 `<firstname>.<lastname>@<company>.com`，這將導致錯誤，指出 Cognito 使用者名稱不符合定義的 regex 模式。

![無效的參數錯誤](http://docs.aws.amazon.com/zh_tw/res/latest/ug/images/res-invalid-parameters-regex.png)


此錯誤是由 RES 從使用者的電子郵件字首自動產生使用者名稱所造成。不過，在 RES 支援的特定 Linux 發行版本中，具有 "." 的使用者名稱不是 VDIs 的有效使用者。此修正會在產生使用者名稱時移除電子郵件字首中的任何 "."，讓使用者名稱在 RES Linux VDIs上有效。

**受影響的版本**

RES 2024.12 和 2024.12.01 版 

**緩解**

1. 執行下列命令來下載 2024.12 版或 `cognito_sign_up_email_fix.patch` 2024.12.01 版`cognito_sign_up_email_fix.patch`的 `patch.py`和 ，將 取代`<output-directory>`為您要下載修補程式指令碼和修補程式檔案的目錄，並將 `<environment-name>`取代為 RES 環境的名稱：

   1. 此修補程式適用於 RES 2024.12 和 2024.12.01。

   1. 修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。

   1. 為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY=<output-directory>
   ENVIRONMENT_NAME=<environment-name>
   RES_VERSION=<res-version> # either 2024.12 or 2024.12.01
   
   mkdir -p ${OUTPUT_DIRECTORY}
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patches/cognito_sign_up_email_fix.patch --output ${OUTPUT_DIRECTORY}/cognito_sign_up_email_fix.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令：

   ```
   python3 ${OUTPUT_DIRECTORY}/patch.py --environment-name ${ENVIRONMENT_NAME} --res-version ${RES_VERSION} --module cluster-manager --patch ${OUTPUT_DIRECTORY}/cognito_sign_up_email_fix.patch
   ```

1. 重新啟動您環境的 Cluster Manager 執行個體。您也可以從 Amazon EC2 管理主控台終止執行個體。

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

1. 檢查以名稱 開頭的自動擴展群組活動，以驗證 Cluster Manager 執行個體狀態`<RES-EnvironmentName>-cluster-manager-asg`。等待新執行個體成功啟動。

........................

### (2024.12.01 及更早版本） 使用自訂網域連線至 VDI 時出現無效的憑證錯誤
<a name="res-troubleshooting-known-issues-2024x-invalid-bad-cert"></a>

**錯誤描述**

當您使用自訂入口網站網域名稱部署[外部資源配方](create-external-resources.md)和 RES 時，CertificateRenewalNode 無法在 中重新整理 VDI 連線的 TLS 憑證，並顯示下列錯誤`/var/log/user-data.log`：

```
{
  "type": "urn:ietf:params:acme:error:unauthorized",
  "detail": "Error finalizing order :: OCSP must-staple extension is no longer available: see https://letsencrypt.org/2024/12/05/ending-ocsp",
  "status": 403
}
```

因此，當您在 RES Web 入口網站中連線至 VDIs 時，將會遇到 (`net::ERR_CERT_DATE_INVALID`Chrome) 或 `Error code: SSL_ERROR_BAD_CERT_DOMAIN`(FireFox) 的錯誤。

**受影響的版本**

2024.12.01 及更早版本

**緩解**

1. 導覽至 EC2 主控台。如果有名為 的執行個體`CertificateRenewalNode-`，請終止執行個體。

1. 導覽至 Lambda 主控台。開啟名為 之 Lambda 函數的原始程式碼`-CertificateRenewalLambda-`。識別注視 的行，`./acme.sh --issue --dns dns_aws --ocsp-must-staple --keylength 4096`並移除`--ocsp-must-staple`引數。

1. 選取**部署**並等待程式碼變更生效。

1. 若要手動觸發 Lambda 函數：請前往**測試**索引標籤，然後選取**測試**。不需要額外的輸入。這應該會建立憑證 EC2 執行個體，以更新 Secret Manager 中的憑證和 PrivateKey 秘密。秘密更新後，執行個體會自動終止。

1. 終止現有的 dcv-gateway 執行個體：`<env-name>-vdc-gateway`並等待自動擴展群組自動部署新的執行個體。

**錯誤詳細資訊**

Let's Encrypt 將於 2025 年結束 OCSP 支援。從 2025 年 1 月 30 日開始，除非請求帳戶先前已發行包含 OCSP 必須取代延伸的憑證，否則 OCSP 必須取代請求將會失敗。如需詳細資訊，請參閱 [ https://letsencrypt.org/2024/12/05/ending-ocsp/](https://letsencrypt.org/2024/12/05/ending-ocsp/)：//。

........................

### (2024.12 和 2024.12.01) Active Directory 使用者無法 SSH 到堡壘主機
<a name="res-troubleshooting-known-issues-2024x-ad-users-cannot-ssh"></a>

**錯誤描述**

Active Directory 使用者在依照 RES Web 入口網站的指示連線至堡壘主機時，會收到許可遭拒的錯誤。

由於缺少環境變數，在堡壘主機上執行的 Python 應用程式無法啟動 SSSD 服務。因此，AD 使用者對作業系統是未知的，無法登入。

**受影響的版本**

2024.12 和 2024.12.01

**緩解**

1. 從 EC2 主控台連線至堡壘主機執行個體。

1. 在 IDEA\_CLUSTER\_NAME 下編輯`/etc/environment`並新增 `environment_name=<res-environment-name>`作為新行。

1. 在執行個體上執行下列命令：

   ```
   source /etc/environment
   sudo service supervisord restart
   sudo systemctl restart supervisord
   ```

1. 嘗試依照 RES Web 入口網站的指示再次連線至堡壘主機。

........................

### (2024.10) 針對部署在隔離 VPCs 中的 RES 環境，VDI 自動停止中斷
<a name="res-troubleshooting-known-issues-2024x-vdi-auto-stop-broken"></a>

**錯誤描述**

在 2024.10 RES 版本中，為閒置一段時間的 VDIs 自動停止。此設定可在桌面設定 → 伺服器 → 工作階段中設定。

部署在隔離 VPCs 中的 RES 環境目前不支援 VDI 自動停止。

**受影響的版本**

2024.10

**緩解**

我們目前正在處理未來版本中將包含的修正。不過，仍然可以在 RES 環境中手動停止部署在隔離 VPCs中的 VDIs。

........................

### (2024.10 及更早版本） 無法啟動 VDI for Graphic 增強型執行個體類型
<a name="res-troubleshooting-known-issues-2024x-fail-to-launch-vdi"></a>

**錯誤描述**

在圖形增強型執行個體類型 (g4、g5) 上啟動 Amazon Linux 2 - x86\_64、RHEL 8 - x86\_64 或 RHEL 9 x86\_64 VDI 時，執行個體會卡在佈建狀態。這表示執行個體永遠不會進入「就緒」狀態，且可供連線使用。

這是因為 X Server 無法在執行個體上正確執行個體化。套用此修補程式後，我們也建議您將圖形執行個體的軟體堆疊根磁碟區大小增加到 50gb，以確保有足夠的空間安裝所有相依性。

**受影響的版本**

所有 RES 2024.10 版或更早版本。

**緩解**

1. 下載 [ patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.10/patch_scripts/patch.py) 和 [ graphic\_enhanced\_instance\_types\_fix.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.10/patch_scripts/patches/graphic_enhanced_instance_types_fix.patch)，方法是將 取代`<output-directory>`為您要下載修補程式指令碼和修補程式檔案的目錄，並將 `<environment-name>`取代為下列命令中的 RES 環境名稱：

   1. 修補程式僅適用於 RES 2024.10。

   1. 修補程式指令碼需要 AWSCLI v2、Python 3.9.16 或更新版本，以及 Boto3。

   1. 為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY=<output-directory>
   ENVIRONMENT_NAME=<environment-name>
   
   mkdir -p ${OUTPUT_DIRECTORY}
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.10/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.10/patch_scripts/patches/graphic_enhanced_instance_types_fix.patch --output ${OUTPUT_DIRECTORY}/graphic_enhanced_instance_types_fix.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令：

   ```
   python3 ${OUTPUT_DIRECTORY}/patch.py --environment-name ${ENVIRONMENT_NAME} --res-version 2024.10 --module virtual-desktop-controller --patch ${OUTPUT_DIRECTORY}/graphic_enhanced_instance_types_fix.patch
   ```

1. 若要終止您環境的虛擬桌面控制器 (vdc-controller) 執行個體，請執行下列命令，取代顯示的 RES 環境名稱。

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-vdc-controller \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

1. 在名稱開頭為 的目標群組`<RES-EnvironmentName>-vdc-ext`正常運作後，啟動新的執行個體。我們建議您為圖形執行個體註冊的任何新軟體堆疊至少要有 50GB 的儲存空間。

........................

### (2024.08) 準備基礎設施 AMI 失敗
<a name="res-troubleshooting-known-issues-2024x-prep-infra-ami-fail"></a>

**錯誤描述**

當您根據[先決條件文件中](prerequisites.md#private-vpc)列出的指示使用 EC2 Image Builder 準備 AMIs 時，建置程序會失敗，並顯示下列錯誤訊息：

```
CmdExecution: [ERROR] Command execution has resulted in an error
```

這是因為文件中提供的相依性檔案中的錯誤。

**受影響的版本**

2024 年 8 月

**緩解**

*建立新的 EC2 Image Builder 資源：*

（如果您從未為 RES 執行個體準備 AMIs請遵循以下步驟）

1. 下載更新的 [ res-installation-scripts.tar.gz](samples/res-installation-scripts.zip) 檔案。

1. 請遵循[先決條件](prerequisites.md#private-vpc)頁面上*準備 Amazon Machine Image AMIs)* 中列出的步驟。

*重複使用先前的 EC2 Image Builder 資源：*

（如果您已為 RES 執行個體準備 AMIs請遵循以下步驟）

1. 下載更新的 [ res-installation-scripts.tar.gz](samples/res-installation-scripts.zip) 檔案。

1. 導覽至 EC2 Image Builder → 元件 → 按一下為準備 RES AMIs元件。

1. 請注意內容 → DownloadRESInstallScripts 步驟 → 輸入 → 來源下列出的 S3 位置。

1. 上面找到的 S3 位置包含先前使用的相依性檔案，請將此檔案取代為第一個步驟中下載的檔案。

........................

### (2024.08) 虛擬桌面無法掛載具有根儲存貯體 ARN 和自訂字首的讀取/寫入 Amazon S3 儲存貯體
<a name="res-troubleshooting-known-issues-2024x-vdi-fails-to-mount-s3"></a>

**錯誤描述**

使用根儲存貯體 ARN （即 ) 和自訂字首 （專案名稱或專案名稱和使用者名稱） 時，研究和工程 Studio 2024.08 無法在虛擬桌面基礎設施 (VDI`arn:aws:s3:::example-bucket`) 執行個體上掛載讀取/寫入 S3 儲存貯體。

**不受此問題影響**的儲存貯體組態包括：
+ 唯讀儲存貯體
+ 具有字首做為儲存貯體 ARN （即 `arn:aws:s3:::example-bucket/example-folder-prefix`) 和自訂字首 （專案名稱或專案名稱和使用者名稱） 一部分的讀取/寫入儲存貯體 
+ 具有根儲存貯體 ARN 但沒有自訂字首的讀取/寫入儲存貯體

佈建 VDI 執行個體之後，該 S3 儲存貯體的指定掛載目錄將不會掛載儲存貯體。雖然 VDI 上的掛載目錄將存在，但目錄將為空，且不會包含儲存貯體的目前內容。當您使用終端機將檔案寫入目錄時，`Permission denied, unable to write a file`將會擲回錯誤，而且檔案內容不會上傳到對應的 S3 儲存貯體。

**受影響的版本**

2024 年 8 月

**緩解**

1. 若要下載修補程式指令碼和修補程式檔案 (`patch.py` 和 `s3_mount_custom_prefix_fix.patch`)，請執行下列命令，`<output-directory>`將 取代為您要下載修補程式指令碼和修補程式檔案的目錄，並將 `<environment-name>`取代為 RES 環境的名稱：

   1. 修補程式僅適用於 RES 2024.08。

   1. 修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。

   1. 為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有 Amazon S3 寫入 RES 建立之儲存貯體的許可。

   ```
   OUTPUT_DIRECTORY=<output-directory>
   ENVIRONMENT_NAME=<environment-name>
   
   mkdir -p ${OUTPUT_DIRECTORY}
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.08/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.08/patch_scripts/patches/s3_mount_custom_prefix_fix.patch --output ${OUTPUT_DIRECTORY}/s3_mount_custom_prefix_fix.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令：

   ```
   python3 ${OUTPUT_DIRECTORY}/patch.py --environment-name ${ENVIRONMENT_NAME} --res-version 2024.08 --module virtual-desktop-controller --patch ${OUTPUT_DIRECTORY}/s3_mount_custom_prefix_fix.patch
   ```

1. 若要終止您環境的虛擬桌面控制器 (vdc-controller) 執行個體，請執行下列命令。（您已在第一個步驟中將`ENVIRONMENT_NAME`變數設定為 RES 環境的名稱。)

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-vdc-controller \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```
**注意**  
對於私有 VPC 設定，如果您尚未這樣做，則對於 `<RES-EnvironmentName>-vdc-custom-credential-broker-lambda`函數，請務必新增名稱為 `AWS_STS_REGIONAL_ENDPOINTS`且值`Environment variable`為 的 `regional`。如需詳細資訊，請參閱[隔離 VPC 部署的 Amazon S3 儲存貯體先決條件](S3-buckets-prereqs.md)。

1. 以名稱開頭的目標群組`{{<RES-EnvironmentName>}}-vdc-ext`運作狀態良好後，將需要啟動新的 VDIs，其將具有已正確掛載根儲存貯體 ARN 和自訂字首的讀取/寫入 S3 儲存貯體。

........................

### (2024.06) 當 AD 群組名稱包含空格時，套用快照失敗
<a name="res-troubleshooting-known-issues-2024x-apply-snapshot-fails"></a>

**問題**

如果 AD 群組名稱中包含空格，RES 2024.06 無法套用先前版本的快照。

在 AD 同步期間，叢集管理員 CloudWatch 日誌 （在`/<environment-name>/cluster-manager`日誌群組下） 將包含下列錯誤：

```
[apply-snapshot] authz.role-assignments/<Group name with spaces>:group#<projectID>:project FAILED_APPLY because: [INVALID_PARAMS] Actor key doesn't match the regex pattern ^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{1,20}:(user|group)$ 
```

RES 產生的錯誤僅接受符合下列要求的群組名稱：
+ 它只能包含小寫和大寫 ASCII 字母、數字、破折號 (-)、句點 (.) 和底線 (\_)
+ 不允許破折號 (-) 做為第一個字元
+ 其中不可含有空格。

**受影響的版本**

2024.06

**緩解**

1. 若要下載修補程式指令碼和修補程式檔案 ([ patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py) 和 [ groupname\_regex.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patches/groupname_regex.patch))，請執行下列命令，`<output-directory>`將 取代為您要放置檔案的目錄，並將 `<environment-name>`取代為 RES 環境的名稱：

   1. 此修補程式僅適用於 RES 2024.06 

   1. 修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。

   1. 為部署 AWSRES 的帳戶和區域設定 CLI，並確保您擁有寫入 RES 建立之儲存貯體的 S3 許可：

      ```
      OUTPUT_DIRECTORY={{<output-directory>}}
      ENVIRONMENT_NAME={{<environment-name>}}
      
      mkdir -p ${OUTPUT_DIRECTORY}
      curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
      curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patches/groupname_regex.patch --output ${OUTPUT_DIRECTORY}/groupname_regex.patch
      ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令：

   ```
   python3 patch.py --environment-name ${ENVIRONMENT_NAME} --res-version 2024.06 --module cluster-manager --patch ${OUTPUT_DIRECTORY}/groupname_regex.patch 
   ```

1. 若要重新啟動您環境的 Cluster Manager 執行個體，請執行下列命令：您也可以從 Amazon EC2 管理主控台終止執行個體。

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

**注意**  
修補程式允許 AD 群組名稱包含小寫和大寫 ASCII 字母、數字、破折號 (-)、句點 (.)、底線 (\_) 和總長度介於 1 到 30 之間的空格。

........................

### (2024.06 及更早版本） AD 同步期間未同步至 RES 的群組成員
<a name="res-troubleshooting-known-issues-2024x-group-not-synced"></a>

**錯誤描述**

如果 GroupOU 與 UserOU 不同，群組成員將無法正確同步至 RES。

RES 會在嘗試從 AD 群組同步使用者時建立 ldapsearch 篩選條件。目前的篩選條件不正確地使用 UserOU 參數，而不是 GroupOU 參數。結果是搜尋無法傳回任何使用者。此行為只會發生在 UsersOU 和 GroupOU 不同的執行個體中。

**受影響的版本**

所有 RES 2024.06 版或更早版本 

**緩解**

請依照下列步驟來解決問題：

1. 若要下載 patch.py 指令碼和 group\_member\_sync\_bug\_fix.patch 檔案，請執行下列命令，`<output-directory>`將 取代為您要下載檔案的本機目錄，並將 `<res_version>`取代為您要修補的 RES 版本：
**注意**  
修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [ Boto3](https://aws.amazon.com/sdk-for-python/)。
為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。
此修補程式僅支援 RES 2024.04.02 和 2024.06 版。如果您使用的是 2024.04 或 2024.04.01，您可以遵循 中列出的步驟[次要版本更新](update-the-product.md#minor-version-updates)，先將環境更新為 2024.04.02，然後再套用修補程式。  
RES 版本：RES 2024.04.02   
修補程式下載連結：[2024.04.02\_group\_member\_sync\_bug\_fix.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/2024.04.02_group_member_sync_bug_fix.patch) 
RES 版本：RES 2024.06   
修補程式下載連結：[2024.06\_group\_member\_sync\_bug\_fix.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patches/2024.06_group_member_sync_bug_fix.patch) 

   ```
   OUTPUT_DIRECTORY={{<output-directory>}}
   RES_VERSION={{<res_version>}}
   mkdir -p ${OUTPUT_DIRECTORY}
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/${RES_VERSION}/patch_scripts/patches/${RES_VERSION}_group_member_sync_bug_fix.patch --output ${OUTPUT_DIRECTORY}/${RES_VERSION}_group_member_sync_bug_fix.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令，`<environment-name>`將 取代為您的 RES 環境名稱：

   ```
   cd ${OUTPUT_DIRECTORY}
   ENVIRONMENT_NAME={{<environment-name>}}
   
   python3 patch.py --environment-name ${ENVIRONMENT_NAME} --res-version ${RES_VERSION} --module cluster-manager --patch $PWD/${RES_VERSION}_group_member_sync_bug_fix.patch
   ```

1. 若要重新啟動您環境的叢集管理員執行個體，請執行下列命令：

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

........................

### (2024.06 及更早版本） CVE-2024-6387、RegreSSHion、RHEL9 和 Ubuntu VDIs中的安全漏洞
<a name="res-troubleshooting-known-issues-2024x-regresshion"></a>

**錯誤描述**

OpenSSH 伺服器中已識別稱為 regreSSHion 的 [CVE-2024-6387](https://nvd.nist.gov/vuln/detail/CVE-2024-6387)。此漏洞可讓未驗證的遠端攻擊者在目標伺服器上執行任意程式碼，為利用 OpenSSH 進行安全通訊的系統帶來嚴重風險。

對於 RES，標準組態是透過堡壘主機進入 SSH 進入虛擬桌面，而堡壘主機不受此漏洞影響。不過，我們在**所有** RES 版本中為 RHEL9 和 Ubuntu2024 VDIs （虛擬桌面基礎設施） 提供的預設 AMI (Amazon Machine Image) 會使用易受安全威脅影響的 OpenSSH 版本。

這表示現有的 RHEL9 和 Ubuntu2024 VDIs 可以利用，但攻擊者需要存取堡壘主機。

有關此問題的更多詳細資訊，請參閱[此處](https://vulcan.io/blog/cve-2024-6387-how-to-fix-regresshion-vulnerability/)。

**受影響的版本**

所有 RES 2024.06 版或更早版本。

**緩解**

RHEL9 和 Ubuntu 都已針對 OpenSSH 發行修補程式，以修正安全性漏洞。您可以使用平台各自的套件管理員提取這些套件。

如果您有現有的 RHEL9 或 Ubuntu VDIs，建議您遵循以下 **PATCH EXISTING VDIs**說明。若要修補未來的 VDIs，建議您遵循 **PATCH FUTURE VDIs**指示。這些指示說明如何執行指令碼，在您的 VDIs 上套用平台更新。

**修補現有的 VDIs**

1. 執行下列命令來修補所有現有的 Ubuntu 和 RHEL9 VDIs：

   1. 修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)。

   1. 為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有傳送 AWSSystems Manager Run Command 的 Systems Manager 許可。

      ```
      aws ssm send-command \
          --document-name "AWS-RunRemoteScript" \
          --targets "Key=tag:res:NodeType,Values=virtual-desktop-dcv-host" \
          --parameters '{"sourceType":["S3"],"sourceInfo":["{\"path\":\"https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/scripts/patch_openssh.sh\"}"],"commandLine":["bash patch_openssh.sh"]}'
      ```

1. 您可以在執行[命令頁面上](https://console.aws.amazon.com/systems-manager/run-command)驗證指令碼是否成功執行。按一下**命令歷史記錄**索引標籤，選取最新的命令 ID，並確認所有執行個體 IDs都有 SUCCESS 訊息。

**PATCH 未來 VDIs**

1. 若要下載修補程式指令碼和修補程式檔案 ([https：//patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patch.py) 和 [ update\_openssh.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patches/update_openssh.patch))，請執行下列命令，`<output-directory>`將 取代為您要下載檔案的目錄，並將 `<environment-name>`取代為 RES 環境的名稱：
**注意**  
修補程式僅適用於 RES 2024.06。
修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。
為部署 AWSRES 的帳戶和區域設定 CLI 複本，並確保您具有寫入 RES 所建立儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY={{<output-directory>}}
   ENVIRONMENT_NAME={{<environment-name>}}
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.06/patch_scripts/patches/update_openssh.patch --output ${OUTPUT_DIRECTORY}/update_openssh.patch
   ```

1. 執行下列修補程式命令：

   ```
   python3 ${OUTPUT_DIRECTORY}/patch.py --environment-name ${ENVIRONMENT_NAME} --res-version 2024.06 --module virtual-desktop-controller --patch ${OUTPUT_DIRECTORY}/update_openssh.patch 
   ```

1. 使用下列命令重新啟動您環境的 VDC 控制器執行個體：

   ```
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-vdc-controller \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

**重要**  
僅 RES 2024.06 版和更新版本支援修補未來的 VDIs。若要在 RES 環境中使用早於 2024.06 的版本修補未來的 VDIs，請先使用下列指示將 RES 環境升級至 2024.06：[主要版本更新](update-the-product.md#major-version-update)。

........................

### (2024.04-2024.04.02) 提供未連接至 VDI 執行個體角色的 IAM 許可界限
<a name="res-troubleshooting-known-issues-2024x-iam-boundary"></a>

**問題**

虛擬桌面工作階段未正確繼承其專案的許可界限組態。這是 IAMPermissionBoundary 參數定義的許可界限在建立專案期間未正確指派給專案的結果。

**受影響的版本**

2024.04 - 2024.04.02

**緩解**

請依照下列步驟，允許 VDIs 正確繼承指派給專案的許可界限：

1. 若要下載修補程式指令碼和修補程式檔案 ([ patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py) 和 [ vdi\_host\_role\_permission\_boundary.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/vdi_host_role_permission_boundary.patch))，請執行下列命令，`<output-directory>`將 取代為您要放置檔案的本機目錄：

   1. 修補程式僅適用於 RES 2024.04.02。如果您使用的是 2024.04 或 2024.04.01 版，您可以依照[公有文件中列出的步驟進行次要版本更新](update-the-product.md#minor-version-updates)，將環境更新為 2024.04.02。

   1. 修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。

   1. 為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY={{<output-directory>}}
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/vdi_host_role_permission_boundary.patch --output ${OUTPUT_DIRECTORY}/vdi_host_role_permission_boundary.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令，`<environment-name>`將 取代為您的 RES 環境名稱：

   ```
   python3 patch.py --environment-name {{<environment-name>}} --res-version 2024.04.02 --module cluster-manager --patch vdi_host_role_permission_boundary.patch 
   ```

1. 執行此命令以 RES 環境`<environment-name>`的名稱取代 ，以重新啟動您環境中的 cluster-manager 執行個體。您也可以從 Amazon EC2 管理主控台終止執行個體。

   ```
   ENVIRONMENT_NAME={{<environment-name>}}
   
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

........................

### (2024.04.02 及更早版本） ap-southeast-2 （雪梨） 中的 Windows NVIDIA 執行個體無法啟動
<a name="res-troubleshooting-known-issues-2024x-nvidia-instances"></a>

**問題**

Amazon Machine Image AMIs) 用於在特定組態的 RES 中啟動虛擬桌面 VDIs)。每個 AMI 都有每個區域的關聯 ID。在 RES 中設定為在 ap-southeast-2 （雪梨） 中啟動 Windows Nvidia 執行個體的 AMI ID 目前不正確。

這類執行個體組態`ami-0e190f8939a996caf`的 AMI-ID 錯誤地列在 ap-southeast-2 （雪梨） 中。`ami-027cf6e71e2e442f4` 應該改用 AMI ID。

嘗試使用預設 `ami-0e190f8939a996caf` AMI 啟動執行個體時，使用者會收到下列錯誤。

```
An error occured (InvalidAMIID.NotFound) when calling the RunInstances operation: The image id ‘[ami-0e190f8939a996caf]’ does not exist 
```

重現錯誤的步驟，包括範例組態檔案：
+ 在 ap-southeast-2 區域中部署 RES。
+ 使用 Windows-NVIDIA 預設軟體堆疊 (AMI ID `ami-0e190f8939a996caf`) 啟動執行個體。

**受影響的版本**

所有 RES 2024.04.02 版或更早版本都會受到影響

**緩解**

下列緩解措施已在 RES 2024.01.01 版上進行測試：
+ 使用下列設定註冊新的軟體堆疊
  + AMI ID：`ami-027cf6e71e2e442f4`
  + 作業系統：Windows
  + GPU 製造商：NVIDIA
  + 最小值 儲存大小 (GB)：30
  + 最小值 RAM (GB)：4
+ 使用此軟體堆疊來啟動 Windows-NVIDIA 執行個體

........................

### (2024.04 和 2024.04.01) GovCloud 中的 RES 刪除失敗
<a name="res-troubleshooting-known-issues-2024x-delete-fail"></a>

**問題**

在 RES 刪除工作流程期間，`UnprotectCognitoUserPool`Lambda 會停用稍後將刪除的 Cognito 使用者集區的刪除保護。Lambda 執行是由 啟動`InstallerStateMachine`。

由於商業和 GovCloud 區域之間的預設 AWSCLI 版本差異，Lambda 中的`update_user_pool`呼叫會在 GovCloud 區域失敗。

嘗試刪除 GovCloud 區域中的 RES 時，客戶會收到下列錯誤：

```
Parameter validation failed: Unknown parameter in input: \"DeletionProtection\", must be one of: UserPoolId, Policies, LambdaConfig, AutoVerifiedAttributes, SmsVerificationMessage, EmailVerificationMessage, EmailVerificationSubject, VerificationMessageTemplate, SmsAuthenticationMessage, MfaConfiguration, DeviceConfiguration, EmailConfiguration, SmsConfiguration, UserPoolTags, AdminCreateUserConfig, UserPoolAddOns, AccountRecoverySetting
```

重現錯誤的步驟：
+ 在 GovCloud 區域中部署 RES
+ 刪除 RES 堆疊

**受影響的版本**

RES 2024.04 版和 2024.04.01

**緩解**

RES 2024.04 版已測試下列緩解措施：
+ 開啟 `UnprotectCognitoUserPool` Lambda
  + 命名慣例： `{{<env-name>}}-InstallerTasksUnprotectCognitoUserPool-...`
+ **執行時間設定** -> **編輯** -> 選取**執行時間** `Python 3.11` -> **儲存**。
+ 開啟 CloudFormation。
+ 刪除 RES 堆疊 -> 保留安裝程式資源 UNCHECKED -> **刪除**。

........................

### (2024.04 - 2024.04.02) 重新啟動時，Linux 虛擬桌面可能卡在「繼續」狀態
<a name="res-troubleshooting-known-issues-2024x-linux-stuck-resuming"></a>

**問題**

在手動或排程停止之後重新啟動時，Linux 虛擬桌面可能會卡在「恢復」狀態。

重新啟動執行個體後，AWSSystems Manager 不會執行任何遠端命令來建立新的 DCV 工作階段，而且 vdc-controller CloudWatch 日誌中缺少下列日誌訊息 （在 `/<environment-name>/vdc/controller` CloudWatch 日誌群組下）：

```
Handling message of type DCV_HOST_REBOOT_COMPLETE_EVENT 
```

**受影響的版本**

2024.04 - 2024.04.02

**緩解**

若要復原卡在「繼續」狀態的虛擬桌面：

1. 從 EC2 主控台將 SSH 傳送至問題執行個體。

1. 在執行個體上執行下列命令：

   ```
   sudo su -
   /bin/bash /root/bootstrap/latest/virtual-desktop-host-linux/configure_post_reboot.sh
   sudo reboot
   ```

1. 等待執行個體重新啟動。

若要防止新的虛擬桌面執行到相同的問題：

1. 若要下載修補程式指令碼和修補程式檔案 ([ patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py) 和 [ vdi\_stuck\_in\_resuming\_status.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/vdi_stuck_in_resuming_status.patch))，請執行下列命令，`<output-directory>`將 取代為您要放置檔案的目錄：
**注意**  
修補程式僅適用於 RES 2024.04.02。
修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。
為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY={{<output-directory>}}
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/vdi_stuck_in_resuming_status.patch --output ${OUTPUT_DIRECTORY}/vdi_stuck_in_resuming_status.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令，`<environment-name>`將 取代為您的 RES 環境名稱，並將 `<aws-region>`取代為部署 RES 的區域：

   ```
   python3 patch.py --environment-name {{<environment-name>}} --res-version 2024.04.02 --module virtual-desktop-controller --patch vdi_stuck_in_resuming_status.patch --region {{<aws-region>}} 
   ```

1. 若要重新啟動您環境的 VDC 控制器執行個體，請執行下列命令，`<environment-name>`將 取代為您的 RES 環境名稱：

   ```
   ENVIRONMENT_NAME={{<environment-name>}}
   
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-vdc-controller \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

........................

### (2024.04.02 及更早版本） 無法同步 SAMAccountName 屬性包含大寫字母或特殊字元的 AD 使用者
<a name="res-troubleshooting-known-issues-2024x-samaccountname"></a>

**問題**

SSO 設定至少兩小時後 （兩個 AD 同步週期），RES 無法同步 AD 使用者。叢集管理員 CloudWatch 日誌 （在`/<environment-name>/cluster-manager`日誌群組下） 在 AD 同步期間包含下列錯誤：

```
Error: [INVALID_PARAMS] Invalid params: user.username must match regex: ^(?=.{3,20}$)(?![_.])(?!.*[_.]{2})[a-z0-9._]+(?<![_.])$ 
```

RES 產生的錯誤僅接受符合下列要求的 SAMAccount 使用者名稱：
+ 它只能包含小寫 ASCII 字母、數字、句點 (.)、底線 (\_)。
+ 不允許使用句點或底線做為第一個或最後一個字元。
+ 它不能包含兩個連續的句點或底線 （例如 ..、\_\_、.\_、\_.)。

**受影響的版本**

2024.04.02 及更早版本

**緩解**

1. 若要下載修補程式指令碼和修補程式檔案 ([ patch.py](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py) 和 [ samaccountname\_regex.patch](https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/samaccountname_regex.patch))，請執行下列命令，`<output-directory>`將 取代為您要放置檔案的目錄：
**注意**  
修補程式僅適用於 RES 2024.04.02。
修補程式指令碼需要 [AWSCLI v2](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)、Python 3.9.16 或更新版本，以及 [Boto3](https://aws.amazon.com/sdk-for-python/)。
為部署 RES 的帳戶和區域設定 AWSCLI，並確保您具有寫入 RES 建立之儲存貯體的 S3 許可。

   ```
   OUTPUT_DIRECTORY={{<output-directory>}}
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patch.py --output ${OUTPUT_DIRECTORY}/patch.py
   
   curl https://research-engineering-studio-us-east-1.s3.amazonaws.com/releases/2024.04.02/patch_scripts/patches/samaccountname_regex.patch --output ${OUTPUT_DIRECTORY}/samaccountname_regex.patch
   ```

1. 導覽至下載修補程式指令碼和修補程式檔案的目錄。執行下列修補程式命令，`<environment-name>`將 取代為您的 RES 環境名稱：

   ```
   python3 patch.py --environment-name {{<environment-name>}} --res-version 2024.04.02 --module cluster-manager --patch samaccountname_regex.patch 
   ```

1. 若要重新啟動您環境的 Cluster Manager 執行個體，請執行下列命令，`<environment-name>`將 取代為您的 RES 環境名稱。您也可以從 Amazon EC2 管理主控台終止執行個體。

   ```
   ENVIRONMENT_NAME={{<environment-name>}}
   
   INSTANCE_ID=$(aws ec2 describe-instances \
       --filters \
       Name=tag:Name,Values=${ENVIRONMENT_NAME}-cluster-manager \
       Name=tag:res:EnvironmentName,Values=${ENVIRONMENT_NAME}\
       --query "Reservations[0].Instances[0].InstanceId" \
       --output text)
    
   aws ec2 terminate-instances --instance-ids ${INSTANCE_ID}
   ```

........................

### (2024.04.02 及更早版本） 用於存取堡壘主機的私有金鑰無效
<a name="res-troubleshooting-known-issues-2024x-private-key"></a>

**問題**

當使用者從 RES Web 入口網站下載私有金鑰以存取堡壘主機時，金鑰格式不正確 – 多行下載為單行，這會使金鑰無效。當使用者嘗試使用下載的金鑰存取堡壘主機時，會收到下列錯誤：

```
Load key "{{<downloaded-ssh-key-path>}}": error in libcrypto
{{<user-name>}}@{{<bastion-host-public-ip>}}: Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
```

**受影響的版本**

2024.04.02 及更早版本

**緩解**

我們建議您使用 Chrome 下載金鑰，因為此瀏覽器不受影響。

或者，可以透過在 後面建立新行`-----BEGIN PRIVATE KEY-----`，然後在 前面建立新行來重新格式化金鑰檔案`-----END PRIVATE KEY-----`。

........................