[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: problems with bdb-indexes



peter pilsl wrote:


I set up a simple ldap-backend to maintain our systems userdatabase.
After finding loads of entries in my log like:

Jan 22 17:51:10 ihf2 slapd[18454]: <= bdb_equality_candidates: (uid) index_param
failed (18)


I looked up the docs and found that this is cause no proper index for uid is
defined.


So I setup a index in slapd.conf

index   uid             eq

Now there are no such messages in my logs again, but ldap-search does not work
anymore !!! And all applications that rely on ldap (postfix, cyrus, nss, pam ..)
dont work proper anymore.


As soon as I remove the index, everything is working fine again. This is very
strange to me. The proper index-file is created in my ldap-directory: uid.bdb
when slapd is started, so I dont think I need to manually create the index after
setting an index to an already existing ldap-datebase. I also didnt find
anything in the docs about creating an index mannually.

That's funny. In slapd-bdb( 5 ) I see: index {<attrlist>|default} [pres,eq,approx,sub,<special>] Specify the indexes to maintain for the given attribute (or list of attributes). .... Note: changing index settings requires rebuilding indices, see slapindex(8).

ps: I use slapd 2.2.26 on a ubuntu 6.10-machine

You're almost 2 years out of date. Current stable release is 2.3.32. There are good reasons to upgrade, including the ability to configure things at runtime (without server restarts) and have index changes generated automatically.
--
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc
OpenLDAP Core Team http://www.openldap.org/project/