https://bugs.openldap.org/show_bug.cgi?id=9820
--- Comment #1 from Jean-Loup Gregoire jlbs.gregoire@gmail.com --- Hello,
A few more elements,
When redirecting the search result to a file, the connexion is not broken during the search (except if you activate the debug on ldapsearch)
ex: /opt/openldap-2.6.1/bin/ldapsearch -x -D cn=manager,dc=societe,dc=com -w 'password' > test.ldif => OK /opt/openldap-2.6.1/bin/ldapsearch -x -D cn=manager,dc=societe,dc=com -w 'password' > /dev/null => OK
/opt/openldap-2.6.1/bin/ldapsearch -x -D cn=manager,dc=societe,dc=com -w 'password' => KO /opt/openldap-2.6.1/bin/ldapsearch -x -d -1 -D cn=manager,dc=societe,dc=com -w 'password' => KO
Here is the result of a test with the debug activated on the client side :
/opt/openldap-2.6.1/bin/ldapsearch -x -d -1 -D cn=manager,dc=societe,dc=com -w 'password'
ldapsearch result : ... ldap_get_attribute_ber ldap_msgfree ldap_result ld 0x556c377e8d20 msgid -1 wait4msg ld 0x556c377e8d20 msgid -1 (infinite timeout) wait4msg continue ld 0x556c377e8d20 msgid -1 all 0 ** ld 0x556c377e8d20 Connections: * host: /opt/openldap/var/run/ldapi port: 0 (default) * from: PATH= refcnt: 2 status: Connected last used: Mon Apr 11 12:33:57 2022
** ld 0x556c377e8d20 Outstanding Requests: * msgid 2, origid 2, status InProgress outstanding referrals 0, parent count 0 ld 0x556c377e8d20 request count 1 (abandoned 0) ** ld 0x556c377e8d20 Response Queue: Empty ld 0x556c377e8d20 response count 0 ldap_chkResponseList ld 0x556c377e8d20 msgid -1 all 0 ldap_chkResponseList returns ld 0x556c377e8d20 NULL ldap_int_select read1msg: ld 0x556c377e8d20 msgid -1 all 0 ber_get_next ldap_read: want=8, got=0
ber_get_next failed, errno=0. ldap_msgfree
# numResponses: 1847 # numEntries: 1847 ldap_err2string ldap_result: Can't contact LDAP server (-1) ldap_do_free_request: asked to free lr 0x556c377eb360 msgid 2 refcnt 0 ldap_free_connection 1 1 ldap_free_connection: actually freed
content of openldap.log : Apr 11 12:33:57 debian slapd[29476]: conn=1687 fd=18 ACCEPT from PATH=/opt/openldap-2.6.1/var/run/ldapi (PATH=/opt/openldap-2.6.1/var/run/ldapi) Apr 11 12:33:57 debian slapd[29476]: conn=1687 op=0 BIND dn="cn=manager,dc=societe,dc=com" method=128 Apr 11 12:33:57 debian slapd[29476]: conn=1687 op=0 BIND dn="cn=manager,dc=societe,dc=com" mech=SIMPLE bind_ssf=0 ssf=71 Apr 11 12:33:57 debian slapd[29476]: conn=1687 op=0 RESULT tag=97 err=0 qtime=0.000013 etime=0.000270 text= Apr 11 12:33:57 debian slapd[29476]: conn=1687 op=1 SRCH base="dc=societe,dc=com" scope=2 deref=0 filter="(objectClass=*)" Apr 11 12:34:35 debian slapd[29476]: conn=1687 fd=18 closed (idletimeout)
The problem occurs also for syncrepl, If we load a LDIF on the client before startup, it manages to take the the updates from the master, but if we start the client empty (to load from its master), connection failures occur.
Regards
Jean-Loup