简介
本文档介绍如何在CUC和Google Workspace之间邮箱不同步时进行故障排除。
先决条件
要求
Cisco 建议您了解以下主题:
- 思科 Unity Connection (CUC)
- 谷歌工作空间
- 简单邮件传输协议 (SMTP)
使用的组件
本文档不限于特定的软件和硬件版本。
本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您的网络处于活动状态,请确保您了解所有命令的潜在影响。
背景信息
发布服务器和订用服务器运行正常,但尝试发送语音邮件通知(单一收件箱或语音邮件至邮件功能)失败。
导航到CUC Administration Page > Unified Messaging > Unified Messaging Services > Open the Unified Messaging Account。即使配置设置正确,也会出现同步错误。
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 Console并删除已创建的服务帐户。
步骤2.添加新服务帐户。
步骤3.分配这些角色
步骤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)无效,这是失败的原因,在日志中多次出现“invalid grant”错误。它可能已过期或其时间戳(iat或exp值)超出了可接受的范围。
Google API要求令牌是短期的(通常为1小时或更短),并且请求在令牌的有效时间范围内进行。这与在CUC和Google之间处理令牌的方式有关。
确保令牌的生存时间(TTL)小于60分钟,并且网络时间协议(NTP)已在服务器、计算机和Internet之间同步。