21.3. 识别并解决有关过时或缺失供应商的错误
目录服务器将关于复制拓扑的信息(如所有将更新发送到其他副本的供应商)存储在一组称为副本更新向量(RUV)的元数据中。RUV 包含有关供应商的信息,如 ID 和 URL、本地服务器上的最后一次更改状态号(CSN),以及第一次更改的 CSN。供应商和消费者均存储 RUV 信息,它们使用它来控制复制更新。
当您从复制拓扑中删除供应商时,可以保留到另一个副本的 RUV 的信息。您可以使用 cleanallruv
任务来删除拓扑中的所有供应商。
前提条件
- 启用复制。
流程
监控
/var/log/dirsrv/slapd-instance_name/errors
日志文件,并搜索类似如下的条目:[22/Jan/2021:17:16:01 -0500] NSMMReplicationPlugin - ruv_compare_ruv: RUV [changelog max RUV] does not contain element [{replica 8 ldap://server2.example.com:389} 4aac3e59000000080000 4c6f2a02000000080000] which is present in RUV [database RUV] ... [22/Jan/2021:17:16:01 -0500] NSMMReplicationPlugin - replica_check_for_data_reload: Warning: for replica dc=example,dc=com there were some differences between the changelog max RUV and the database RUV. If there are obsolete elements in the database RUV, you should remove them using the CLEANALLRUV task. If they are not obsolete, you should check their status to see why there are no changes from those servers in the changelog.
[22/Jan/2021:17:16:01 -0500] NSMMReplicationPlugin - ruv_compare_ruv: RUV [changelog max RUV] does not contain element [{replica 8 ldap://server2.example.com:389} 4aac3e59000000080000 4c6f2a02000000080000] which is present in RUV [database RUV] ... [22/Jan/2021:17:16:01 -0500] NSMMReplicationPlugin - replica_check_for_data_reload: Warning: for replica dc=example,dc=com there were some differences between the changelog max RUV and the database RUV. If there are obsolete elements in the database RUV, you should remove them using the CLEANALLRUV task. If they are not obsolete, you should check their status to see why there are no changes from those servers in the changelog.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在这种情况下,副本 ID
8
会导致这个错误。显示所有 RUV 记录和副本 ID,分别有效且无效:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 请注意返回的副本 ID 列表:
1、
2
和8
。为副本 ID
8
运行清理任务。dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8
# dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8dsconf -D "cn=Directory Manager" ldap://server1.example.com repl-tasks cleanallruv --suffix="dc=example,dc=com" --replica-id=8
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 请注意,目录服务器复制 RUV 清理任务。因此,您只需要在一个供应商上启动任务。
如果一个副本无法加入,例如,如果其停机,您可以使用
--force-cleaning
选项来实现 RUV 的即时清理。
验证
显示 RUV 记录和副本 ID:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 该命令不再返回副本 ID
8
的 RUV 条目。