使用日志进行问题排查

有时候,Password Sync 日志中有几行内容看起来像是错误,但事实上这通常并不代表任何同步或设置问题。请使用以下信息排查问题。

试用日志分析器

将轨迹日志提交至 Google 管理员工具箱日志分析器。系统只需片刻即可确定大部分问题。

详细了解在哪里可以找到跟踪文件

Password Sync 日志

打开此部分  |  全部收起并转至页首

跟踪文件日志位于何处?

您可以在计算机的以下位置找到 Password Sync 跟踪日志:C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Google\Google Apps Password Sync\Tracing\password_sync_service

如需查看跟踪日志文件的示例,请参阅下文中的查看日志部分。

其他日志和配置文件位于何处?

您可以使用 Password Sync 支持工具(Google 的一款开源工具),从所有网域控制器中收集 Password Sync 日志和问题排查信息。

查找配置文件和日志

配置文件

  • 文件位置:

    C:\ProgramData\Google\Google Apps Password Sync\config.xml

  • 要对文件执行的操作:

    查看该配置文件,以检查设置。

服务日志

  • 文件位置:

    C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Google\Google Apps Password Sync\Tracing\password_sync_service

  • 要对文件执行的操作:

    如果 Password Sync 设置成功,但并未同步全部或部分用户的密码,请查看服务日志文件。

    如需查看跟踪日志文件的示例,请参阅下文中的查看日志部分。

服务授权日志

  • 文件位置:

    C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Google\Identity

  • 要对文件执行的操作:

    如果您在 Password Sync 服务日志中看到错误代码为 0x6、0x203、0x4 或 0x102 的“身份验证失败”错误,请查看服务授权日志文件。

    如需查看授权日志文件的示例,请参阅下文中的查看日志部分。

配置界面日志

  • 文件位置:

    C:\Users\<您的用户名>\AppData\Local\Google\Google Apps Password Sync\Tracing\Password Sync

    C:\Users\<您的用户名>\AppData\Local\Google\Google Apps Password Sync\Tracing\GoogleAppsPasswordSync(如果您使用的是 1.6 或更低版本)

  • 要对文件执行的操作:

    如果您在配置过程中遇到问题,请查看配置界面日志文件。

    如需查看跟踪日志文件的示例,请参阅下文中的查看日志部分。

配置界面授权日志

  • 文件位置:

    C:\Users\<您的用户名>\AppData\Local\Google\Identity

  • 要对文件执行的操作:

    如果您在配置过程中的 Google 授权环节遇到问题,请查看配置界面授权日志文件。

DLL 日志

  • 文件位置:

    C:\Windows\System32\config\systemprofile\AppData\Local\Google\Google Apps Password Sync\Tracing\lsass

  • 要对文件执行的操作:

    如果服务日志没有显示尝试更改密码的迹象(没有成功及问题报告),请查看 DLL 日志文件。

命令行安装程序日志

  • 文件位置:

    C:\Users\<您的用户名>\AppData\Local\Google\Google Apps Password Sync\Tracing\MsiExec

  • 要对文件执行的操作:

    如果您在通过命令行安装 Password Sync 时遇到问题,请查看安装程序日志和 msi_log.txt 文件(或是提供给参数 /l*vx 的文件名所对应的文件)。

崩溃报告日志

  • 文件位置:

    如果 Password Sync 界面配置工具崩溃,您可以在以下位置找到日志:
    C:\Users\<您的用户名>\AppData\Local\Temp

    如果 Password Sync 服务崩溃,您可以在以下位置找到日志:C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp

  • 要对文件执行的操作:

    如果管理员更改了默认的临时目录,请参阅如何识别您的临时目录,查找有关获取该信息的说明。

如何识别您的临时目录

如果 Password Sync 配置向导崩溃,请执行以下操作:

  1. 打开命令提示符窗口 (CMD)
  2. 输入:echo %TEMP%

如果 Password Sync 服务崩溃,请执行以下操作:

  1. 从这篇 Microsoft 文章下载 PsExec 程序文件。
  2. 打开命令提示符窗口 (CMD)。
  3. 转到 PsExec 文件下载到的目录。
  4. 输入:psexec.exe -i -s %SystemRoot%\system32\cmd.exe
  5. 系统会打开一个新命令窗口。指定以下命令:whoami

    系统会显示类似于“nt authority\system”的消息。

  6. 输入 echo %TEMP%
查看日志

如果您遇到网络连接错误(例如,网络超时、连接遭拒等)或 SSL/TLS 问题(例如,安全连接问题),则日志会显示该工具尝试连接的 IP 地址。如果存在安全连接问题,日志会显示相关原因(例如,证书名称不符、证书过期、CRL 检查失败等)和证书详细信息(例如,Google 证书或 HTTPS 检查代理)。这样应该能显著减少利用网络捕获排查问题的需要,主日志(文件名为 Trace-*.log)和授权日志(位于“Identity”文件夹中)也同样能发挥相同的作用。

授权日志示例

[2022-09-21T03:59:46:ERROR:windows_http.cc(331)] TLS connection failure. See details below. [Status: 0x00010000. Status Info: 0x00000001]
[2022-09-21T03:59:46:ERROR:windows_http.cc(340)] Certificate details:
---Validity--
Valid from: 2017-09-13 17:23:55 UTC
Valid until: 2017-12-06 17:10:00 UTC
---Subject---
US
California
Mountain View
Google Inc
*.googleapis.com
---Issuer----
US
Google Inc
Google Internet Authority G2
-------------
[2022-09-21T03:59:46:ERROR:windows_http.cc(282)] WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED: Certification revocation checking has been enabled, but the revocation check failed to verify whether a certificate has been revoked. The server used to check for revocation might be unreachable.
[2022-09-21T03:59:46:ERROR:windows_http.cc(197)] Error from API WinHttpSendRequest with WinHTTP proxy. Will try direct (without proxy). Code: 0x00002f8f
[2022-09-21T03:59:46:ERROR:windows_http.cc(107)] Network connection destination details: 216.58.194.170:443 (sfo07s13-in-f170.1e100.net)

在此示例中,计算机当前日期的年份被改为 2022,导致系统误认为证书已过期。每个日志行的开头显示了当前日期,而证书的“Valid from”和“Valid until”日期与当前日期不匹配。错误标记 WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED 表明系统未能检查证书吊销情况。

最后一个日志行的“Network connection destination details”后面显示了目的地 IP 地址和已解析的主机名。这是 1e100.net address,代表 Google。

跟踪日志示例

注意此日志示例来自 GWMMO。如果 GSMME、Password Sync 或 GWSMO 遇到网络连接/TLS 问题,也会生成类似的跟踪日志条目。

2017-09-21T04:10:04.356-03:00 1a20 E:Network ClientMigration!WinHttp::HandleCallback @ 2025 ()> Secure connection failure. Status: 0x00010000. Info 0x00000009
2017-09-21T04:10:04.356-03:00 1a20 E:Network ClientMigration!WinHttp::HandleCallback @ 2030 ()> Failure details:
WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED: Certification revocation checking has been enabled, but the revocation check failed to verify whether a certificate has been revoked. The server used to check for revocation might be unreachable.
WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA: The function is unfamiliar with the Certificate Authority that generated the server's certificate.
Certificate details:
---Validity--
Valid from: 2016-09-20T04:08:45.000Z
Valid until: 2022-09-20T04:08:45.000Z
---Subject---
Created by http://www.fiddler2.com
DO_NOT_TRUST
*.google.com
---Issuer----
Created by http://www.fiddler2.com
DO_NOT_TRUST
DO_NOT_TRUST_FiddlerRoot
-------------
2017-09-21T04:10:04.356-03:00 1a20 E:Network ClientMigration!WinHttp::HandleCallback @ 2071 ()> Error result 5, hr = 0x80072f8f. Setting event 0000000000001638.
2017-09-21T04:10:04.356-03:00 1a20 E:Network ClientMigration!WinHttp::HandleCallback @ 2076 ()> Network connection destination details: 127.0.0.1:8888 (COMPUTERNAME)

在此示例中,用户安装了 Fiddler 并将其用于执行 HTTPS 解密(这表示该工具使用的是自己的证书),但其证书已从 Windows 受信证书列表中移除,因此不受系统信任。请注意,由于 Fiddler 是代理工具,因此会连接到 127.0.0.1 而不是 Google。错误标记包含 WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA,这表示证书授权机构 (CA).  不受系统信任。另请注意,该证书并非由 Google 颁发。

此处展示的示例文本很容易被攻击者伪造,因此不得用来进行身份验证(请改为使用 CA 签名)。但对于找出执行 SSL 检查/中间人 (MITM) 攻击的防火墙/代理的设置问题,这非常有用。

记录错误

打开此部分  |  全部收起并转至页首

日志顶部提及 Outlook 的错误

如果您使用的是旧版 Password Sync,它可能会在日志文件开头显示与 Microsoft Outlook 相关的错误。这不会影响 Password Sync,您可以忽略这类错误。下文列举了包含 Outlook 错误的 Password Sync 日志示例:

2022-04-12T09:00:00.563+03:00 14cc E:Generic password_sync_service!GetOutlookExePath @ 24 ()> Failed with 0x80070002, last successful line = 17.
2022-04-12T09:00:00.578+03:00 14cc E:Generic password_sync_service!GetOutlookVersion @ 255 ()> Failed with 0x80070002, last successful line = 247.
2022-04-12T09:00:00.578+03:00 14cc E:Generic password_sync_service!GetOfficeRegistryBase @ 362 ()> Failed with 0x80070002, last successful line = 360.
2022-04-12T09:00:00.578+03:00 14cc E:Generic password_sync_service!ResourceStrings::GetOutlookLanguage @ 124 ()> Failed with 0x80070002, last successful line = 111.

Password Sync 的日志组件正尝试寻找 Outlook 版本并将其报告在日志中。由于 Outlook 对 Password Sync 而言不是必需的,因此您可以放心地忽略这些错误。

服务日志中的 WinHTTP 警告和错误

部分与 WinHTTP(Password Sync 用来连接到 Google 的 Microsoft Windows 组件)相关的错误和警告是良性的,例如:

2022-08-06T03:30:46.590-07:00 8d4 W:Network password_sync_service!LogPotentialProxyNetworkFailure @ 287 (user@example.com)> WinHttpGetProxyForUrl auto-detect failed with 0x80072f94. 0/(null). IsNetworkActive is 1, flags 1, IsNetworkActive GetLastError 0x80004005
2022-08-06T03:30:47.371-07:00 8d4 A:PasswordSync password_sync_service!PasswordSyncTask::RetriveUser @ 210 (user@example.com)> retrieved user......
2022-08-06T03:30:47.374-07:00 8d4 A:PasswordSync password_sync_service!PasswordSyncTask::RetriveUser @ 257 (user@example.com)> Successfully retrieved user
2022-08-06T03:30:47.374-07:00 8d4 A:PasswordSync password_sync_service!AppsLogin::AppsLogin @ 32 (user@example.com)> Created Apps login
2022-08-06T03:30:48.113-07:00 8d4 A:PasswordSync password_sync_service!PasswordSyncTask::UpdateUser @ 181 (user@example.com)> Successfully updated password
2022-08-06T03:30:48.113-07:00 8d4 W:Network password_sync_service!WinHttp::WaitForAsyncEvent @ 2088 (user@example.com)> Handle closed while waiting for CloseAllTrackedWinhttpHandles.
2022-08-06T03:30:48.113-07:00 8d4 E:Network password_sync_service!WinHttp::WaitForAsyncEvent @ 2089 (user@example.com)> Failed with 0x80072ef3, last successful line = 2062.
2022-08-06T03:30:48.113-07:00 8d4 E:Network password_sync_service!WinHttp::CloseAllTrackedWinhttpHandles @ 1766 (user@example.com)> Failed waiting for handle close, retry 0, hr = 80072ef3, 1 handles remaining

这些错误和警告表明部分操作没有像 Password Sync 预期的那样完成。但是,日志报告了 "Successfully updated password"。这表明您可以忽略有关网络的错误和警告,因为密码已正常同步。

未能读取服务日志中的部分 Active Directory 数据

您可能会在日志中看到如下错误:

2022-04-25T14:24:54.052+03:00 fd0 A:PasswordSync password_sync_service!PasswordSyncService::RunSyncService @ 309 ()> Updating password for "COMP$"

2022-04-25T14:24:54.130+03:00 93c E:PasswordSync password_sync_service!LDAPConnector::QueryForTargetEmail @ 86 ()> Failed with 0x80005010, last successful line = 83.

2022-04-25T14:24:54.130+03:00 93c E:PasswordSync password_sync_service!PasswordSyncTask::DoWork @ 77 ()> Error while retrieving target email for COMP$

被更新密码的实体以美元符号 ($) 结尾。这表明该实体是 Active Directory 中的计算机帐号。由于计算机帐号没有电子邮件地址,因此 Password Sync 未能检索到电子邮件地址,因而未能同步密码。这是正常行为,因为 Windows 会自动设置计算机帐号的密码,因此不需要将密码同步到您的 Google 帐号中。

配置界面日志中的数据加载错误

在首次运行 Password Sync 配置界面时,您可能会在 Password Sync 配置界面日志中看到以下错误(带有标记“E”):

2022-02-13T16:07:05.374+00:00 13e0 A:PasswordSync PasswordSync!PasswordSyncConfig::InitSyncConfig @ 334 ()> Loading config from C:\ProgramData\\Google\Google Apps Password Sync\config.xml
2022-02-13T16:07:05.374+00:00 13e0 E:PasswordSync PasswordSync!SyncConfig::Load @ 40 ()> Failed with 0x80070002, last successful line = 37.

这是正常行为,因为您是首次运行配置界面,没有现成的配置。不过,如果上述错误出现在服务日志中,则可能表明您已为 Password Sync 启用应用兼容性设置。请先确保该设置已停用,然后再次尝试配置 Password Sync。

Password Sync 创建的常见 Windows 事件日志条目

Password Sync 会为重要事件添加 Windows 事件日志条目。您可以在事件查看器 接着点击 应用和服务日志 接着点击 Google 下找到这类日志。所有事件都以“GoogleAppsPasswordSync”作为来源。这些信息还会写入 Password Sync 日志文件。

注意:Windows 事件日志条目的信息可帮助您轻松进行监控。如需了解完整的问题排查信息,请参阅 Password Sync 问题排查


如果密码因为不符合用户名和群组名称准则密码准则而同步失败:

Event ID: 258
Severity: Warning
Category: LSASS
Contents: An attempt to change the password for user "USERNAME" was made. However, the new password contains unsupported characters. The password can not be updated on the Google Account, and will be out of sync with Active Directory.

 


如果用户尝试更改密码时 Password Sync 服务关闭:

Event ID: 259
Severity: Error
Category: LSASS
Contents: An error occurred while trying to communicate with the Password Sync Service; the password update request for account "USERNAME" could not be processed.

Status = 0 (0x00000000).

Please make sure the service is running.


如果为用户哈希密码时出错:

Event ID: 260
Severity: Error
Category: LSASS
Contents: An error occurred while hashing the password for account "USERNAME".

Status = 0 (0x00000000).


如果用户设置的密码长度超过 200 个字符,系统会将其截断。用户在 Active Directory 中设置的密码保持不变,但该密码不会与 Google 帐号同步:

Event ID: 261
Severity: Warning
Category: LSASS
Contents: Password for account "USERNAME" being trucated to to the first 200 characters.


Password Sync 服务启动时:

Event ID: 512
Severity: Informational
Category: Service
Contents: Password Sync service starting.


Password Sync 服务停止时:

Event ID: 513
Severity: Informational
Category: Service
Contents: Password Sync service shut down.

Status = 0 (0x00000000)


Active Directory 用户密码与 Google 帐号成功同步时:

Event ID: 514
Severity: Success
Category: Service
Contents: The password change for Active Directory user "USERNAME" was synchronized to Google Account "username@example.com" successfully.

Status = 0 (0x00000000)


如果 Password Sync 收到密码更改通知,但找不到相应的 Active Directory 用户时:

Event ID: 768
Severity: Error
Category: LDAP Connector
Contents: The account "USERNAME" was not found on Active Directory.

LDAP Connector status = 20498 (0x00005012).

注意:如需了解详情,请转到错误代码 0x00005012


如果未设置电子邮件属性的 Active Directory 用户更改了密码:

Event ID: 769
Severity: Warning
Category: LDAP Connector
Contents: The account "USERNAME" seems not to have an Email attribute set; its password will not get synchronized to Google.

LDAP Connector status = -2147463152 (0x80005010).

注意:有关详情,请参阅错误代码 0x80005010


如果查询 Active Directory 时发生意外错误:

Event ID: 770
Severity: Error
Category: LDAP Connector
Contents: An unexpected error occurred while querying Active Directory.

LDAP Connector status = -2147467259 (0x80004005).

System Message: Unspecified failure


如果在尝试同步密码时 API 请求失败:

Event ID: 1024
Severity: Error
Category: Google Connector
Contents: An API call to the Google server returned an unexpected response while updating the password for account "username@example.com" during the 'PasswordSyncTask::PutUser' step; all retries have been exhausted.

Details:
- Host: apps-apis.google.com
- Auth Result = 0 (0x00000000)
- GDataStatus = 7 (0x00000007) GDSTATUS_BAD_REQUEST
- hResult 1 = -2147217401 (0x80041007)
- hResult 2 = 0 (0x00000000)

注意:事件详细信息中可能包含不同的状态和结果代码,您可能还需要进一步检查 Password Sync 日志文件以准确找出错误原因。


“Google”、Google Workspace 以及相关标志和徽标是 Google LLC 的商标。其他所有公司名和产品名是其各自相关公司的商标。

该内容对您有帮助吗?

您有什么改进建议?
搜索
清除搜索内容
关闭搜索框
主菜单
8773615275538267116
true
搜索支持中心
true
true
true
false
false