由於RepoInit指令碼中的使用者名稱衝突導致AEM Sites中的管道失敗

在Adobe Experience Manager (AEM) as a Cloud Service中的生產管道期間,由於服務使用者名稱與RepoInit指令碼中的現有使用者群組名稱衝突,該管道無法進行超過​ 部署 ​階段的作業。 本文提供解決這些衝突的步驟。

說明 description

環境

  • Adobe Experience Manager (AEM) as a Cloud Service — 網站
  • 元件:Cloud Manager

問題/症狀

在AEM as a Cloud Service中執行生產管道期間,該管道最多完成​ 建置影像 ​階段,但在​ 安裝可變內容 ​步驟的​ 部署 ​階段失敗。

症狀包括:

  • 延長執行時間後再失敗,先前的執行個體需要數小時。

  • 部署程式卡住。

  • 錯誤記錄中出現下列錯誤:

    code language-none
    level: ERROR
    
            msg: [ Apache Sling Repository Startup Thread #1]
    
            com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted
    
            javax.jcr.RepositoryException: Applying repoinit operation failed despite retry; set loglevel to DEBUG to see all exceptions. Last exception message from "Configuration PID 325, script[ 0] " was: Unable to create service user [ <serviceusername>] :org.apache.jackrabbit.api.security.user.AuthorizableTypeException: Invalid authorizable type 'interface org.apache.jackrabbit.api.security.user.User
    
    code language-none
    level: ERROR
    
            msg: [ Apache Sling Repository Startup Thread #1]
    
            com.adobe.granite.panic.impl.PanicLoggerDetail uuid : 000000xx-xx00-0x00-00xx-000000xx0xxx reason : Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted throwable :
    
            javax.jcr.RepositoryException: Applying repoinit operation failed despite retry; set loglevel to DEBUG to see all exceptions. Last exception message from "Configuration PID 325, script[ 0] " was: Unable to create service user [ <serviceusername>] :org.apache.jackrabbit.api.security.user.AuthorizableTypeException: Invalid authorizable type 'interface org.apache.jackrabbit.api.security.user.User _ at...
    

原因

識別出的此問題的根本原因是與存放庫中的現有使用者或群組名稱衝突。 特別是,如果嘗試使用符合現有群組名稱的ID來建立服務使用者,就會造成衝突,阻礙成功部署。

解決方法 resolution

若要解決在部署期間建立服務使用者時的衝突,請遵循下列步驟:

  1. 確認是否有任何現有群組或使用者的名稱與RepoInit指令碼建立的群組或使用者的名稱相同。
  2. 請確定RepoInit指令碼中指定的服務使用者名稱不會與環境中任何預先存在的使用者或群組ID衝突。
    • 範例調整可能涉及重新命名衝突的群組/使用者或變更指令碼的命名慣例。
  3. 完成變更以避免命名衝突後,請透過管道重新部署您的程式碼,並驗證它是否繼續執行先前失敗的步驟。
  4. 進行調整後,請先在非生產環境中測試部署,以確保在嘗試另一個生產部署之前不會發生進一步的問題。
  5. 如需進一步協助,請考慮向Adobe的技術團隊尋求其他支援。
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f