搜索

第 11 章 日志文件参考

download PDF

目录服务器将事件记录到日志文件,对于解决现有问题和预测潜在问题至关重要,这可能会导致性能失败或不佳。

使用日志文件,您可以实现以下目标:

  • 对问题进行故障排除。
  • 监控服务器活动。
  • 分析目录活动。

要有效地监控目录,您必须了解日志文件的结构和内容。

您没有在章节中找到日志消息的详细列表。提供的信息是解决常见问题的良好起点,并了解访问、错误、审计、审计失败和安全日志中记录。

目录服务器实例将日志存储在 /var/log/dirsrv/slapd-instance_name 目录中。

11.1. 访问日志参考

目录服务器访问日志包含有关与目录的客户端连接的详细信息。连接是来自同一客户端的请求序列,结构如下:

  • 提供连接索引和客户端的 IP 地址的连接记录
  • 绑定记录
  • 绑定结果记录
  • 连接、关闭和带外记录时一系列操作请求和操作结果对记录或单个记录
  • 取消绑定记录
  • 关闭的记录

访问日志记录示例:

[time_stamp] conn=1 op=73 SRCH base="dc=example,dc=com" scope=2 filter="(&(objectClass=top)(objectClass=ldapsubentry)(objectClass=passwordpolicy))" attrs="distinguishedName"
[time_stamp] conn=1 op=73 RESULT err=0 tag=101 nentries=24 wtime=0.000078414 optime=0.001614101 etime=0.001690742

几乎所有记录都出现在对中:一个服务请求记录,在示例中是 SRCH,后跟一个 RESULT 记录。连接、关闭和带包记录单独出现。

访问日志有几个级别的日志记录,您可以使用 nsslapd-accesslog-level 属性进行配置。

11.1.1. 访问日志记录级别

不同的访问日志记录级别,记录目录服务器执行的不同类型的操作。

访问日志有以下日志级别:

  • 无访问日志记录(0)。
  • 内部访问操作的日志记录(4)。
  • 记录连接、操作和结果(256)。默认级别。
  • 记录以访问条目和引用(512)。

使用 nsslapd-accesslog-level 属性配置访问日志级别。属性值是 additive:如果您设置了日志级别值 260,它包含级别 256 和 4。

11.1.2. 默认访问日志内容

默认情况下,Directory 服务器具有 256 日志记录级别,记录对条目的访问权限,并且包含进一步介绍的信息。

连接号(conn)

目录服务器列出了示例中带有增量连接号 conn=13 的每个外部 LDAP 请求。连接编号在服务器启动后立即从 conn=0 开始。

[time_stamp] conn=13 fd=608 slot=608 connection from 172.17.0.2 to 172.17.0.2

默认情况下,目录服务器不会记录内部 LDAP 请求。要启用内部访问操作的日志记录,请使用 nsslapd-accesslog-level 配置属性。

文件描述符(fd)

每个从外部 LDAP 客户端连接到目录服务器都需要来自操作系统的文件描述符或套接字描述符,本例中为 fd=608fd=608 值表示外部 LDAP 客户端使用文件描述符编号为可用文件描述符总数的 608。

[time_stamp] conn=11 fd=608 slot=608 connection from 172.17.0.2 to 172.17.0.2

插槽号(slot)

示例中的插槽号 slot=608 是访问日志的传统部分,其含义与文件描述符相同。忽略访问日志的这一部分。

[time_stamp] conn=11 fd=608 slot=608 connection from 172.17.0.2 to 172.17.0.2.

操作号(opt)

要处理 LDAP 请求,目录服务器执行一系列操作。对于连接,所有操作请求和操作结果对都有一个增量操作号,以 op=0 开头来识别不同的操作。

[time_stamp] conn=14 op=0 BIND dn="cn=Directory Manager" method=128 version=3
[time_stamp] conn=14 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680
[time_stamp] conn=14 op=1 SRCH base="dc=example,dc=com" scope=2 filter="(uid=bjensen)"
[time_stamp] conn=14 op=2 ABANDON targetop=2 msgid=3 nentries=0 etime=0.0000113702
[time_stamp] conn=14 op=3 UNBIND
[time_stamp] conn=14 op=3 fd=634 closed - U1

在示例中:

  • bind 操作请求的 op=0 和结果
  • 用于 LDAP 搜索请求的 op=1 和结果
  • op=2 用于 abandon 操作
  • op=3 用于 LDAP 客户端发送的未绑定操作和结果

方法类型(method)

示例中的方法号 method=128 表示客户端使用的 LDAPv3 绑定方法。

[time_stamp] conn=11 op=0 BIND dn="cn=Directory Manager" method=128 version=3

方法类型可以有三个可能的值之一:

  • 0 用于身份验证
  • 128 用于通过用户密码进行简单绑定
  • 使用外部身份验证机制的 SASL 绑定

版本号(版本)

版本号表示 LDAP 客户端用于与 LDAP 服务器通信的 LDAP 版本号。LDAP 版本号可以是 LDAPv2 或 LDAPv3。在示例中,它使用 version=3

[time_stamp] conn=11 op=0 BIND dn="cn=Directory Manager" method=128 version=3

错误编号(err)

错误号提供返回执行 LDAP 操作的 LDAP 结果代码。LDAP 错误号 0 表示操作成功。该示例具有 op=0

[time_stamp] conn=2 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680

标签号(标签)

标签号表示操作返回的结果的类型。目录服务器使用 LDAP 协议中的 BER 标签。示例具有 tag=97

[time_stamp] conn=11 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680

下表提供了常用的标签:

标签描述

tag=97

客户端绑定操作的结果。

tag=100

Directory 服务器搜索的实际条目。这不是结果标签,访问日志不包含这样的标签。

tag=101

搜索操作的结果。

tag=103

修改操作的结果。

tag=105

添加操作的结果。

tag=107

删除操作的结果。

tag=109

来自 moddn (重命名)操作的结果。

tag=111

比较操作的结果。

tag=115

当操作搜索的条目包含所需条目的引用时,搜索引用。这不是结果标签,访问日志不包含这样的标签。

tag=120

扩展操作的结果。

tag=121

中间操作的结果。

条目数(nentries)

nentries 记录显示搜索操作与 LDAP 客户端请求匹配的条目数。

[time_stamp] conn=11 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680

在示例中,nentries=0 找不到任何匹配的条目。

已经过的时间(etime)

etime 记录显示目录服务器执行 LDAP 操作所花费的时间或时间(以秒为单位)。

[time_stamp] conn=11 op=1 RESULT err=0 tag=101 nentries=1 wtime=0.000076581 optime=0.000082736 etime=0.000158680 notes=U

在示例中,目录服务器花费 0.000158680 秒来执行该操作。

etime 值 0 表示操作实际上需要 0 纳秒才能执行。

LDAP 请求类型

LDAP 请求类型指示发出的 LDAP 请求 LDAP 客户端的类型。可能的值有:

  • SRCH 用于搜索操作
  • MOD 用于修改操作
  • DEL 用于删除操作
  • add 操作的 ADD
  • MODDN for a moddn (renaming)操作
  • EXT 用于扩展操作
  • 用于带外操作的 ABANDON
  • 如果 LDAP 请求结果对条目排序,则 SORT serialno
[time_stamp] conn=114 op=68 SORT serialno (1)

在示例中,以括号括起的数字指定 LDAP 请求排序了一个候选条目。

LDAP 响应类型

目录服务器可以发出三个 LDAP 响应类型:

  • RESULT 表示客户端 LDAP 请求的结果。
  • ENTRY 表示条目目录服务器返回以响应搜索操作。
  • REFERRAL 表示目录服务器将 LDAP 请求发送到另一台服务器。

RESULT 消息包含以下与性能相关的记录:

wtime
在 worker 线程获取操作前,操作在工作队列中等待的时间
optime
执行任务的实际操作所需的时间
etime
目录服务器接收请求和服务器何时将结果发回到客户端之间的时间。
注意

wtimeoptime 值提供有关服务器如何处理负载和进程操作的有用信息。由于目录服务器需要一些时间来收集这些统计数据,因此 wtimeoptime 值的总和比 etime 值稍长。

搜索指标(注)

目录服务器提供有关在日志条目的备注消息中搜索的附加信息。例如:

[time_stamp] conn=11 op=1 RESULT err=0 tag=101 nentries=1 wtime=0.000076581 optime=0.000082736 etime=0.000158680 notes=U

目录服务器支持以下搜索指示符:

搜索指示符描述

notes=P

分页的搜索指示器。有限资源的 LDAP 客户端可以控制 LDAP 服务器返回搜索操作结果的速率。当执行的搜索使用 LDAP 控制扩展进行简单搜索结果分页时,Directory 服务器会记录 notes=P paged 搜索指示符。这个指示符是信息,不需要进一步的操作。有关页搜索指标的详情,请参阅 RFC 2696 规格

notes=A

未索引的搜索指示符。当过滤器中的所有候选属性都未索引且需要完整表扫描时,目录服务器会记录 notes=A。这可以超过 nsslapd-lookthroughlimit 属性中设置的值。

notes=U

未索引的搜索指示符。在以下情况下,目录服务器会记录 notes=U

  • 至少一个搜索术语是 unindexed。
  • 搜索操作超过 nsslapd-idlistscanlimit 属性中设置的限制。

notes=F

未知属性指示符。当搜索过滤器包含未知属性时,目录服务器会记录 notes=F

notes=M

MFA 插件绑定指示符。当您使用预绑定身份验证插件(如 MFA 插件)为用户帐户配置双因素身份验证时,目录服务器会记录 notes=M

请注意记录可以包括值的组合: notes=P,Anotes=U,P

如果没有索引属性,Directory 服务器必须直接在数据库中搜索它们。这个过程比搜索索引文件更多的资源密集型。

在以下情况下会出现未索引搜索:

  • 即使使用 index 文件,搜索操作也会超过 nsslapd-idlistscanlimit 属性中设置的搜索条目数量。有关 nsslapd-idlistscanlimit 属性的详情,请参阅 nsslapd-idlistscanlimit 描述
  • 不存在索引文件。
  • 搜索需要的方式没有配置索引文件。

要优化将来的搜索,请在索引中添加经常搜索的未索引属性。

注意

不索引的搜索指示器通常附带一个大的 etime 值,因为未索引的搜索通常更耗时。

MFA 插件绑定

当您使用 pre-bind 身份验证插件(如 MFA 插件)为用户帐户配置双因素身份验证时,访问日志记录将 notes=M 备注消息记录到文件中:

[time_stamp] conn=1 op=0 BIND dn=“uid=jdoe,ou=people,dc=example,dc=com” method=128 version=3
[time_stamp] conn=1 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000111632 optime=0.006612223 etime=0.006722325 notes=M details=“Multi-factor Authentication” dn=“uid=jdoe,ou=people,dc=example,dc=com”
注意

要使访问日志记录 notes=M 记录消息,则 pre-bind 身份验证插件必须使用 SLAPI API 设置标记(如果绑定是此插件的一部分)。

VLV 相关条目(VLV)

当搜索涉及虚拟列表视图(VLV)时,Directory 服务器会将适当的条目记录到访问日志文件。与其他条目类似,VLV 特定的记录将分别显示请求和响应信息:

[time_stamp] conn=67 op=8530 VLV 0:5:0210 10:5397 (0)

在示例中,请求信息为 0:5:0210,其格式为 beforeCount:afterCount:index:contentCount。响应信息为 10:5397 (0),格式为 targetPosition:contentCount (resultCode)

如果客户端使用位置值 VLV 请求,则请求信息格式是 beforeCount: afterCount: value

搜索范围(范围)

scope 条目定义了执行的搜索操作的范围,并可具有以下值之一:

  • 0 用于基础搜索
  • 1 用于单级搜索
  • 2 用于子树搜索

扩展操作 OID (oid)

oid 记录提供已执行扩展操作的对象标识符(OID)。以下是使用扩展操作 OID 访问日志记录示例:

[time_stamp] conn=13 op=1 EXT oid="2.16.840.1.113730.3.5.3"
...
[time_stamp] conn=15 op=3 EXT oid="2.16.840.1.113730.3.5.5"

目录服务器支持以下 LDAPv3 扩展操作列表及其 OID:

扩展操作名称描述OID

目录服务器启动复制请求

复制启动器请求复制会话。

2.16.840.1.113730.3.5.3

目录服务器复制响应

复制响应器以响应 Start Replication Request 扩展操作或 End Replication Request 扩展操作。

2.16.840.1.113730.3.5.4

目录服务器结束复制请求

复制启动器终止复制会话。

2.16.840.1.113730.3.5.5

目录服务器复制条目请求

传输包含状态信息(csnUniqueIdentifier)的条目,用于执行副本初始化。

2.16.840.1.113730.3.5.6

目录服务器 Bulk Import Start

客户端使用 Bulk Import Start 操作与导入的后缀一起请求批量导入,Directory 服务器则表示批量导入可能会开始。

2.16.840.1.113730.3.5.7

目录服务器 Bulk Import Finished

客户端使用 Bulk Import Finished 操作结束批量导入,目录服务器确认批量导入结束。

2.16.840.1.113730.3.5.8

更改序列号(csn)

csn 消息(如 csn=3b4c8cfb000000030000 )表示 Directory 服务器收到由其"csn"标识的更新并处理它。

Abandon message (ABANDON)

abandon 消息表示客户端或 Directory 服务器终止一个操作。

以下是包含 abandon 消息的日志记录示例:

[time_stamp] conn=12 op=1 SRCH base="dc=example,dc=com" scope=2 filter="(uid=bjensen)"
[time_stamp] conn=12 op=2 ABANDON targetop=2 msgid=3 nentries=0 etime=0.0000113980

nentries=0 值指示在操作终止前发送的条目服务器数量,etime=0.0000113980 值指示已经过的时间(以秒为单位),targetop=2 对应于 Directory 服务器前面启动的操作号(opt=2)。

如果目录服务器找不到 abandon 的操作,则日志记录包含 targetop=NOTFOUND 信息:

[time_stamp] conn=12 op=2 ABANDON targetop=NOTFOUND msgid=2

示例消息表示目录服务器已在之前完成操作,或者是一个未知的操作。

消息 ID (msgid)

LDAP SDK 客户端生成消息 ID,如 msgid=2,这也是 LDAP 操作标识符。msgid 值可能与 opt 值不同,但它标识相同的操作。目录服务器记录带有 ABANDON 操作的 msgid,并告知用户哪些客户端操作被取消:

[time_stamp] conn=12 op=2 ABANDON targetop=NOTFOUND msgid=2
注意

对于连接,目录服务器操作号选择从 0 开始计算。在大多数 LDAP SDK/客户端实现中,消息 ID 号 msgid 开始计算为 1。这解释了 msgid 经常等于 Directory 服务器选择加上 1 的原因。

SASL 多阶段绑定日志记录

目录服务器记录绑定进程的每个阶段。SASL 连接的错误代码实际上是返回代码:

[time_stamp] conn=16 op=0 BIND dn="" method=sasl version=3 mech=DIGEST-MD5
[time_stamp] conn=16 op=0 RESULT err=14 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680, SASL bind in progress

示例记录表示 SASL 绑定当前正在进行中(在进行中SASL 绑定),并且返回码为 err=14。这意味着连接仍然处于打开状态。目录服务器记录 SASL 将信息与 LDAP 版本号(version=3)绑定,并使用 SASL 机制(mech=DIGEST-MD5)。

注意

因为 SASL 身份验证需要多个步骤,所以目录服务器在 Directory 服务器完成绑定进程时,将经过身份验证的 DN (用于访问控制决策的 DN)记录在 bind RESULT 行中。这显示了映射到 SASL 绑定请求的条目:

[time_stamp] conn=14 op=1 RESULT err=0 tag=97 nentries=0 wtime=0.000076581 optime=0.000082736 etime=0.000158680 dn="uid=jdoe,dc=example,dc=com"

11.1.3. 非默认访问日志内容

当您设置非默认日志级别或应用特定的日志配置时,目录服务器开始将其他信息记录到访问日志文件中。

内部操作记录

当您为内部操作启用日志记录时,Directory 服务器开始记录由 Directory 服务器或客户端启动的内部操作。

服务器发起的内部操作

如果客户端删除了条目,服务器会运行多个内部操作,如查找条目并更新用户所属的组。

以下示例显示了服务器发起的内部操作日志格式:

[time_stamp] conn=Internal(0) op=0(0)(0) MOD dn="cn=uniqueid generator,cn=config"
[time_stamp] conn=Internal(0) op=0(0)(0) RESULT err=0 tag=48 nentries=0 wtime=0.0003979676 optime=0.0003989250 etime=0.0007968796

示例记录具有 conn=Internal,后跟 (0)op=0 (nesting_level)。操作 ID 和内部操作 ID 始终为 0。对于非嵌套日志记录,嵌套级别为 0。

客户端发起的内部操作

客户端发起的内部操作日志除执行搜索的详细信息外还具有搜索基础、范围、过滤器和请求的搜索属性。以下示例显示了日志记录的格式:

[time_stamp] conn=5 (Internal) op=15(1)(0) SRCH base="cn=config,cn=userroot,cn=ldbm database,cn=plugins,cn=config" scope=1 filter="objectclass=vlvsearch" attrs=ALL
[time_stamp] conn=5 (Internal) op=15(1)(0) RESULT err=0 tag=48 nentries=0 wtime=0.0000143989 optime=0.0000151450 etime=0.0000295419
[time_stamp] conn=5 (Internal) op=15(2)(0) SRCH base="cn=config,cn=example,cn=ldbm database,cn=plugins,cn=config" scope=1 filter="objectclass=vlvsearch" attrs=ALL
[time_stamp] conn=5 (Internal) op=15(2)(0) RESULT err=0

示例记录具有 conn 记录,它被设置为客户端连接 ID,后跟字符串 (Internal)op 记录包含操作 ID,后跟 (internal_operation_ID) (nesting_level)。内部操作 ID 可能有所不同。对于非嵌套日志条目,嵌套级别为 0。

启用插件日志记录的内部操作

如果将 nsslapd-plugin-logging 参数设置为 on,且启用了内部操作日志记录(4),Directory 服务器还会记录插件的内部操作。

例如,如果您删除了 uid=user,dc=example,dc=com 条目,而 Referential Integrity 插件会自动从 example 组中删除此条目,服务器会记录以下内容:

[time_stamp] conn=2 op=37 DEL dn="uid=user,dc=example,dc=com"
[time_stamp] conn=2 (Internal) op=37(1) SRCH base="uid=user,dc=example,dc=com" scope=0 filter="(|(objectclass=*)(objectclass=ldapsubentry))" attrs=ALL
[time_stamp] conn=2 (Internal) op=37(1) RESULT err=0 tag=48 nentries=1 wtime=0.0000062569 optime=0.0000067203 etime=0.0000129148
[time_stamp] conn=2 (Internal) op=37(2) SRCH base="dc=example,dc=com" scope=2 filter="(member=uid=user,dc=example,dc=com)" attrs="member"
[time_stamp] conn=2 (Internal) op=37(2) RESULT err=0 tag=48 nentries=0 wtime=0.0000058002 optime=0.0000065198 etime=0.0000123162
[time_stamp] conn=2 (Internal) op=37(3) SRCH base="dc=example,dc=com" scope=2 filter="(uniquemember=uid=user,dc=example,dc=com)" attrs="uniquemember"
[time_stamp] conn=2 (Internal) op=37(3) RESULT err=0 tag=48 nentries=1 wtime=0.0000062123 optime=0.0000066022 etime=0.0000128104
[time_stamp] conn=2 (Internal) op=37(4) MOD dn="cn=example,dc=example,dc=com"
[time_stamp] conn=2 (Internal) op=37(5) SRCH base="cn=example,dc=example,dc=com" scope=0 filter="(|(objectclass=\*)(objectclass=ldapsubentry))" attrs=ALL
[time_stamp] conn=2 (Internal) op=37(5) RESULT err=0 tag=48 nentries=1 wtime=0.0000061994 optime=0.0000068742 etime=0.0000130685
[time_stamp] conn=2 (Internal) op=37(4) RESULT err=0 tag=48 nentries=0 wtime=0.0002600573 optime=0.0002617786 etime=0.0005217545
[time_stamp] conn=2 (Internal) op=37(6) SRCH base="dc=example,dc=com" scope=2 filter="(owner=uid=user,dc=example,dc=com)" attrs="owner"
[time_stamp] conn=2 (Internal) op=37(6) RESULT err=0 tag=48 nentries=0 wtime=0.000061678 optime=0.000076107 etime=0.0000137656
[time_stamp] conn=2 (Internal) op=37(7) SRCH base="dc=example,dc=com" scope=2 filter="(seeAlso=uid=user,dc=example,dc=com)" attrs="seeAlso"
[time_stamp] conn=2 (Internal) op=37(7) RESULT err=0 tag=48 nentries=0 wtime=0.0000031789 optime=0.0000035354 etime=0.0000066978
[time_stamp] conn=2 (Internal) op=37(8) SRCH base="o=example" scope=2 filter="(member=uid=user,dc=example,dc=com)" attrs="member"
[time_stamp] conn=2 (Internal) op=37(8) RESULT err=0 tag=48 nentries=0 wtime=0.0000030987 optime=0.0000032456 etime=0.0000063316
[time_stamp] conn=2 (Internal) op=37(9) SRCH base="o=example" scope=2 filter="(uniquemember=uid=user,dc=example,dc=com)" attrs="uniquemember"
[time_stamp] conn=2 (Internal) op=37(9) RESULT err=0 tag=48 nentries=0 wtime=0.0000021958 optime=0.0000026676 etime=0.0000048634
[time_stamp] conn=2 (Internal) op=37(10) SRCH base="o=example" scope=2 filter="(owner=uid=user,dc=example,dc=com)" attrs="owner"
[time_stamp] conn=2 (Internal) op=37(10) RESULT err=0 tag=48 nentries=0 wtime=0.0000022109 optime=0.00000268003 etime=00000048854
[time_stamp] conn=2 (Internal) op=37(11) SRCH base="o=example" scope=2 filter="(seeAlso=uid=user,dc=example,dc=com)" attrs="seeAlso"
[time_stamp] conn=2 (Internal) op=37(11) RESULT err=0 tag=48 nentries=0 wtime=0.0000021786 optime=0.0000024867 etime=0.0000046522
[time_stamp] conn=2 op=37 RESULT err=0 tag=107 nentries=0 wtime=0.005147365 optime=0.005150798 etime=0.0010297858

访问条目和引用

当您为访问条目和引用(512)启用日志记录时,Directory 服务器在访问日志文件中具有以下记录:

[time_stamp] conn=306 fd=60 slot=60 connection from 127.0.0.1 to 127.0.0.1
[time_stamp] conn=306 op=0 SRCH base="dc=example,dc=com" scope=2 filter="(description=*)" attrs=ALL
[time_stamp] conn=306 op=0 ENTRY dn="ou=Special
[time_stamp] conn=306 op=0 ENTRY dn="cn=Accounting Managers,ou=groups,dc=example,dc=com"
[time_stamp] conn=306 op=0 ENTRY dn="cn=HR Managers,ou=groups,dc=example,dc=com"
[time_stamp] conn=306 op=0 ENTRY dn="cn=QA Managers,ou=groups,dc=example,dc=com"
[time_stamp] conn=306 op=0 ENTRY dn="cn=PD Managers,ou=groups,dc=example,dc=com"
[time_stamp] conn=306 op=0 ENTRY dn="ou=Red Hat Servers,dc=example,dc=com"
[time_stamp0] conn=306 op=0 REFERRAL

该示例具有日志级别 768 (512 + 256),并显示六个条目,以及一个搜索请求在响应时返回的引用。

选项描述

options=persistent 消息表示 Directory 服务器执行持久性搜索。您可以使用持久性搜索来监控目的,并在发生更改时配置将更改返回到给定配置。

以下示例显示了包含选项描述的 5124 日志级别。

[time_stamps] conn=1 (Internal) op=2(1)(0) SRCH base="cn=\22dc=example,dc=com\22,cn=mapping tree,cn=config"scope=0 filter="objectclass=nsMappingTree"attrs="nsslapd-referral" options=persistent

每个搜索操作的统计信息

当您将 nsslapd-statlog-level 属性设置为 1 时,访问日志开始收集指标,如每个搜索操作的索引查找数和整个持续时间。

[time_stamps] conn=1 op=73 SRCH base="dc=example,dc=com" scope=2 filter="(cn=user_*)" attrs=ALL
[time_stamps] conn=1 op=73 STAT read index: attribute=objectclass key(eq)=referral --> count 0
[time_stamps] conn=1 op=73 STAT read index: attribute=cn key(sub)=er_ --> count 24
[time_stamps] conn=1 op=73 STAT read index: attribute=cn key(sub)=ser --> count 25
[time_stamps] conn=1 op=73 STAT read index: attribute=cn key(sub)=use --> count 25
[time_stamps] conn=1 op=73 STAT read index: attribute=cn key(sub)=^us --> count 24
[time_stamps] conn=1 op=73 STAT read index: duration 0.000010276
[time_stamps] conn=1 op=73 RESULT err=0 tag=101 nentries=24 wtime=0.00007841

日志记录示例显示,在搜索过滤器 (cn=useruildDefaults) 期间,Directory 服务器执行以下数据库查找数:

  • 0 用于引用
  • 24 for er_ key
  • 25 对于 ser
  • 25 对于 use
  • 24 对于 ^us

11.1.4. 常见连接代码

目录服务器将连接代码添加到关闭日志消息中,其中包含与连接冲突相关的其他信息。

连接代码描述

A1

客户端中止连接。

B1

遇到损坏的 BER 标签。当目录服务器收到通过线路发送的损坏的 BER 标签时,目录服务器会将 B1 连接代码记录到访问日志。BER 标签可能会因为物理层网络问题或错误的 LDAP 客户端操作而损坏,如 LDAP 客户端在接收所有请求结果前取消操作。

B2

BER 标签比 nsslapd-maxbersize 属性值长。

B3

遇到损坏的 BER 标签。

B4

服务器无法将响应发回到客户端。

P2

检测到关闭或损坏连接。

T1

客户端在闲置周期后不会收到您可以在 nsslapd-idletimeout 属性中设置的空闲周期后的结果。

T2

nsslapd-ioblocktimeout 中设置的时间后,服务器关闭了到停滞的 LDAP 客户端的连接。

U1

服务器在客户端发送未绑定请求后关闭连接。当服务器收到未绑定请求时,服务器总是关闭连接。

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.