Hi!
I have strange problem:
I have newly built ldap database. System is running on Centos 5.5 (same as RHEL 5)
# slapd -V @(#) $OpenLDAP: slapd 2.3.43 (Nov 29 2010 03:44:41) $
mockbuild@builder10.centos.org:/builddir/build/BUILD/openldap-2.3.43/openldap-2.3.43/build-servers/servers/slapd
I have configured syncrepl from ldap1 to ldap2. Both systems have same slapd.conf execpt on ldap1 syncprov overlay, ldap2 syncrepl consumer.
To both servers ldapsearch without additional filters works fine, and returns content of database. However, to ldap1 (synrepl master) applying any search filter gives no results. Only filters I have noticed working are objectClass-filters.
For example like this: --------- shell commands & output start --------- [root@srv]# ldapsearch -x -h ldap1 -b "dc=hq,dc=mydomain,dc=com"
... actual search results removed .....
# search result search: 2 result: 0 Success
# numResponses: 33 # numEntries: 32
[root@srv]# ldapsearch -x -h ldap1 -b "dc=hq,dc=mydomain,dc=com" | grep tavasti memberUid: tavasti memberUid: tavasti memberUid: tavasti # tavasti, Users, hq.mydomain.com dn: uid=tavasti,ou=Users,dc=hq,dc=mydomain,dc=com uid: tavasti homeDirectory: /home/ldap/tavasti
[root@srv]# ldapsearch -x -h ldap1 -b "dc=hq,dc=mydomain,dc=com" uid=tavasti # extended LDIF # # LDAPv3 # base <dc=hq,dc=mydomain,dc=com> with scope subtree # filter: uid=tavasti # requesting: ALL #
# search result search: 2 result: 0 Success
# numResponses: 1 --------- shell commands & output end ---------
On log I get with the last one:
Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 fd=15 ACCEPT from IP=10.x.x.x:347 25 (IP=0.0.0.0:389) Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 op=0 BIND dn="" method=128 Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 op=0 RESULT tag=97 err=0 text= Feb 4 18:29:54 ldap1 slapd[8611]: begin get_filter Feb 4 18:29:54 ldap1 slapd[8611]: EQUALITY Feb 4 18:29:54 ldap1 slapd[8611]: end get_filter 0 Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 op=1 SRCH base="dc=hq,dc=mydomain,dc=com" scope=2 deref=0 filter="(uid=tavasti)" Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_filter_candidates Feb 4 18:29:54 ldap1 slapd[8611]: AND Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_list_candidates 0xa0 Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_filter_candidates Feb 4 18:29:54 ldap1 slapd[8611]: OR Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_list_candidates 0xa1 Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_filter_candidates Feb 4 18:29:54 ldap1 slapd[8611]: EQUALITY Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_filter_candidates: id=0 first=0 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: => bdb_filter_candidates Feb 4 18:29:54 ldap1 slapd[8611]: EQUALITY Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_filter_candidates: id=0 first=0 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_list_candidates: id=0 first=0 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_filter_candidates: id=0 first=0 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_list_candidates: id=0 first=1 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: <= bdb_filter_candidates: id=0 first=1 last=0 Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text= Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 op=2 UNBIND Feb 4 18:29:54 ldap1 slapd[8611]: conn=30 fd=15 closed ----------------------------------------------------------------------
On config I have 'loglevel filter config stats'
Any ideas what on earth is going on?
--On Friday, February 04, 2011 6:45 PM +0200 Markku Tavasti tavasti@tavasti.fi wrote:
On config I have 'loglevel filter config stats'
Any ideas what on earth is going on?
Did you add an index for the "uid" attribute in slapd.conf, and then fail to run slapindex to rebuild the indices? That would certainly cause this behavior.
--Quanah
--
Quanah Gibson-Mount Sr. Member of Technical Staff Zimbra, Inc A Division of VMware, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
On 02/04/2011 08:21 PM, Quanah Gibson-Mount wrote:
Did you add an index for the "uid" attribute in slapd.conf, and then fail to run slapindex to rebuild the indices? That would certainly cause this behavior.
Thanks for your response. Yes, this is the case.
On importing data from old ldap, I got these errors: Error: Internal (implementation specific) error (80), additional info: index generation failed
So I disabled nearly all indexes on config. Imported data, run some tests, and added indexes back to config. I foolishly assumed that slapd would create those indexes or refuse to start if it requires some additional operations.
Thanks for your help, now everything works as expected.
openldap-technical@openldap.org