簡介
本文檔介紹當郵箱在CUC和Google Workspace之間不同步時如何進行故障排除。
必要條件
需求
思科建議您瞭解以下主題:
- Cisco Unity Connection(CUC)
- Google工作空間
- 簡易郵件傳輸通訊協定(SMTP)
採用元件
本文件所述內容不限於特定軟體和硬體版本。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
背景資訊
發佈伺服器和訂閱伺服器可以運行,但傳送語音郵件電子郵件通知(單一收件箱或語音郵件至電子郵件功能)的嘗試失敗。
導航到CUC管理頁面>統一消息>統一消息服務>開啟統一消息帳戶。即使配置設定正確,仍存在同步錯誤。
UM(Cisco Unity到Google Mail)不同步
UM驗證結果
也出現此錯誤。
Status: User mailbox is out of sync, press Reset for resync
Unified Messaging Service: Cisco Unity to Google Mail
Service Type: Google Workspace
User Corporate Email Address: userid@domain.com
[Checked] Synchronize Connection and Google Workspace Mailboxes (Single inbox)
疑難排解
Google配置
步驟1.導航到Google控制檯並刪除已建立的服務帳戶。
步驟2.新增新服務帳戶。
步驟3.分配這些角色
- 服務帳戶金鑰管理員
- 服務帳戶使用者
- Pub/Sub Admin
步驟4.儲存生成的帳戶並下載金鑰檔案(JSON型別)。
步驟5.復制服務帳戶的客戶端ID。
步驟6.在OAuth作用域欄位(Google管理控制檯)中,複製並貼上以下URL逗號分隔的作用域清單:
步驟7.授權範圍並儲存。
步驟8.將新的JSON檔案上傳到Google Workspace UMS配置並儲存。
如果服務在執行檢查後失敗,請收集Connection Google Workspace Notifier。
設定以下Macrotrace:
- 單一收件箱跟蹤
- 郵件跟蹤跟蹤
設定以下微跟蹤:
- CsMbxSync:10-23
- CsEws:All
- EWSNotify:All
- CsWebDav:10-14
- CuEsd:0,5,7
- MTA:10-30
- Cuca:All
- CsExMbxLocator:All
- DBEvent:3,12
提示:此微跟蹤和宏跟蹤調試級別適用於所有單一收件箱/統一消息問題。
在Connection Google Workspace Notifier中,無效的「JWT:權杖必須是短命的權杖(60分鐘),且在一段合理的時間範圍內會看到錯誤。
14:14:10.894 |3917,,,CuGSuiteSyncSrv,22,GSuiteServiceOpTh-40,com.cisco.unity.gsuite.services.GSuiteActionItems.sendMessage - Try # 1 Google Api send message on gsuite
14:14:11.052 |3917,,,CuGSuiteSyncSrv,23,GSuiteServiceOpTh-40,com.cisco.unity.gsuite.services.GSuiteActionItems.sendMessage - Google Api send message on gsuite failed with message 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."
}
14:14:11.052 |3917,,,CuGSuiteSyncSrv,1,GSuiteServiceOpTh-40,com.cisco.unity.gsuite.serviceability.CuGsuiteSyncPerfCounters.incrementHttpsRqstError - Incrementing Http Request Failed counter by 1
14:14:11.052 |3917,,,CuGSuiteSyncSrv,1,GSuiteServiceOpTh-40,com.cisco.unity.gsuite.serviceability.CuGsuiteSyncPerfCounters.incrementHttpsRqstError - Total Http Request Failed after update: 3543
14:14:11.052 |3917,,,CuGSuiteSyncSrv,24,CxnResetSynchService.createNewMsgOnGSuite - 400 Bad Request
{
"error" : "invalid_grant",
"error_description" : "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."
}
Clock Skew: This suggests that the system clock on the server generating the token may be out of sync with Google's servers. Even a small mismatch (e.g., a few seconds) can cause this issue.
14:14:11.052 |3917,,,CuGSuiteSyncSrv,24,com.cisco.unity.gsuite.services.GSuiteActionItems.sendMessage(GSuiteActionItems.java:1132)
com.cisco.unity.gsuite.GSuiteMessageUtility.createMessageOnGmail(GSuiteMessageUtility.java:615)
com.cisco.unity.gsuite.GSuiteMessageUtility.createNewMessageOnGmail(GSuiteMessageUtility.java:475)
com.cisco.unity.gsuite.reset.CxnResetSynchService.createNewMsgOnGSuite(CxnResetSynchService.java:343)
com.cisco.unity.gsuite.reset.CxnResetSynchService.checkWhereToSync(CxnResetSynchService.java:318)
com.cisco.unity.gsuite.reset.CxnResetSynchService.syncCnxMessage(CxnResetSynchService.java:282)
com.cisco.unity.gsuite.reset.CxnResetSynchService.sync(CxnResetSynchService.java:755)
com.cisco.unity.gsuite.reset.UMASyncWorker.resync(UMASyncWorker.java:220)
com.cisco.unity.gsuite.reset.UMASyncWorker.run(UMASyncWorker.java:109)
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
解決方案
用於通過Google API進行身份驗證的JSON Web令牌(JWT)無效,這是失敗的原因,在日誌中多次出現「無效授予」錯誤。它已過期或其時間戳(iat或exp值)超出可接受範圍。
Google API要求令牌壽命短(通常為1小時或更短),並且請求在令牌的有效時間範圍內進行。這與在CUC和Google之間處理令牌的方式有關。
確認權杖的存留時間(TTL)小於60分鐘,且網路時間通訊協定(NTP)已在伺服器、電腦和Internet上同步。