为什么 slapd 记录“connection_read(12): no connection!”?

为什么 slapd 记录“connection_read(12): no connection!”?

为什么 slapd 记录“connection_read(12): no connection!”?

这是全新安装。
没有其他连接。
消息也记录在olcLogLevel: none

命令

kldap1 ~ # ldapwhoami 
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
dn:gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth

日志

Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 fd=12 ACCEPT from PATH=/var/run/openldap/slapd.sock (PATH=/var/run/openldap/slapd.sock)
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=0 BIND dn="" method=163
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=0 BIND authcid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" authzid="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=0 BIND dn="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" mech=EXTERNAL sasl_ssf=0 ssf=71
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=0 RESULT tag=97 err=0 text=
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=1 EXT oid=1.3.6.1.4.1.4203.1.11.3
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=1 WHOAMI
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=1 RESULT oid= err=0 text=
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 op=2 UNBIND
Jul 25 15:24:37 kldap1 slapd[6137]: conn=1055 fd=12 closed
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!
Jul 25 15:24:37 kldap1 slapd[6137]: connection_read(12): no connection!

配置

kldap1 ~ # ldapsearch -b cn=config "(|(cn=config)(olcDatabase={-1}frontend)(olcDatabase={0}config))"
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
# extended LDIF
#
# LDAPv3
# base <cn=config> with scope subtree
# filter: (|(cn=config)(olcDatabase={-1}frontend)(olcDatabase={0}config))
# requesting: ALL
#

# config
dn: cn=config
objectClass: olcGlobal
cn: config
olcConfigFile: /etc/openldap/slapd.conf
olcConfigDir: /etc/openldap/slapd.d/
olcAllows: bind_v2
olcArgsFile: /var/run/openldap/slapd.args
olcAttributeOptions: lang-
olcAuthzPolicy: none
olcConcurrency: 0
olcConnMaxPending: 100
olcConnMaxPendingAuth: 1000
olcGentleHUP: FALSE
olcIdleTimeout: 15
olcIndexSubstrIfMaxLen: 4
olcIndexSubstrIfMinLen: 2
olcIndexSubstrAnyLen: 4
olcIndexSubstrAnyStep: 2
olcIndexIntLen: 4
olcLocalSSF: 71
olcPidFile: /var/run/openldap/slapd.pid
olcReadOnly: FALSE
olcReverseLookup: FALSE
olcSaslSecProps: noplain,noanonymous
olcSizeLimit: unlimited
olcSockbufMaxIncoming: 262143
olcSockbufMaxIncomingAuth: 16777215
olcThreads: 16
olcTimeLimit: unlimited
olcTLSCACertificatePath: /etc/ssl/certs/
olcTLSCRLCheck: none
olcTLSVerifyClient: try
olcToolThreads: 1
olcWriteTimeout: 0
olcLogLevel: stats

# {-1}frontend, config
dn: olcDatabase={-1}frontend,cn=config
objectClass: olcDatabaseConfig
objectClass: olcFrontendConfig
olcDatabase: {-1}frontend
olcAddContentAcl: FALSE
olcLastMod: TRUE
olcMaxDerefDepth: 0
olcReadOnly: FALSE
olcSchemaDN: cn=Subschema
olcSizeLimit: unlimited
olcSyncUseSubentry: FALSE
olcTimeLimit: unlimited
olcMonitoring: FALSE

# {0}config, config
dn: olcDatabase={0}config,cn=config
objectClass: olcDatabaseConfig
olcDatabase: {0}config
olcAccess: {0}to *  by * none
olcAddContentAcl: TRUE
olcLastMod: TRUE
olcMaxDerefDepth: 15
olcReadOnly: FALSE
olcRootDN: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
olcSyncUseSubentry: FALSE
olcMonitoring: FALSE

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

答案1

slapd开始于-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock cldap://'

包容性cldap://导致这种行为的原因我现在不打算弄清楚。如果有人能清楚地回答为什么会出现这种情况,我会将接受的答案改为我们的答案。

我本来不想回答我自己的问题,但偶然发现了答案,我想为什么要浪费别人的时间。

相关内容