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

ldbm-back with gdbm doesn't work on Linux (ITS#372)



Full_Name: Jens Heunemann
Version: 1.2.7
OS: SuSe-Linux 2.2.5 on i686
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (194.221.87.10)


Hello,

I've got the following problem with gdbm and Berkley-db2:
I've compiled openldap with the Berkley-db-version coming with the
Linux-distribution
and everything worked fine (well, at least with one eye closed and the other
half closed :-))
Then I thought to upgrade the DB to either db2 or gdbm. Compilation was o.k, no
errors.
But when I tried to do an ldap-search, I got a "no such object".
When I do the same thing with the original Berkley-db, all is o.k.:
I'm doing the following:
(Configurationfiles and ldif files below)

1. (the case where things go wrong)
#  CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure 
--prefix=/usr/local/openldap --without-subdir --with-ldbm-api=gdbm && make
depend && make && make install
( no errors)
then I start a script which call ldif2ldbm, essentially executing:
#  $LDAPROOT/sbin/ldif2ldbm -i $DATA/ops.ldif -f $CONF/slapd.conf
then I restart the slapd, then I'm doing an ldapsearch:
#  ldapsearch -b "o=ops" "o=*"
and I get: "no such object"

2. If I compile the whole thing with the following line:
#  ./configure  --prefix=/usr/local/openldap --without-subdir && make depend &&
make && make install
(no errors again)
then I ge through the exact same sequence as above (exactly the same
configuration files, exactly the same ldif-input)
I get the two entries which are in the database.


If I compile the whole thing with Berkeley DB2, I get the same behaviour, but
maybe a different output with slapd -d 1
I searched in 

Anybody any ideas, why this occurs? Some Configuration-Problem or anything?

Thanks for your help,

Jens Heunemann

=================
Configuration and debug-output:

The following is the output from slapd -d 1 (case 1):
-------
do_bind
do_bind: version 2 dn () method 128
send_ldap_result 0::
do_search
using base "O=OPS"
subtree_candidates: base: "O=OPS" lookupbase
dn2entry_r: dn: "O=OPS"
=> dn2id( "O=OPS" )
=> ldbm_cache_open( "/usr/local/openldap/tmp/dn2id.dbb", 66, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id NOID
send_ldap_result 32::
--------

The following is the output from slapd -d 1 (case 2):
-----------------
do_bind
do_bind: version 2 dn () method 128
send_ldap_result 0::
do_search
using base "O=OPS"
subtree_candidates: base: "O=OPS" lookupbase
dn2entry_r: dn: "O=OPS"
=> dn2id( "O=OPS" )
=> ldbm_cache_open( "/usr/local/openldap/tmp/dn2id.dbb", 66, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/openldap/tmp/id2entry.dbb", 66, 600 )
<= ldbm_cache_open (opened 1)
=> str2entry
<following lines cut>
----------

Configuration-file:
---------
include         /usr/local/openldap/etc/slapd.at.conf
include         /usr/local/openldap/etc/slapd.oc.conf
schemacheck     on
pidfile         /usr/local/openldap/slapd.pid
argsfile        /usr/local/openldap/slapd.args

database        ldbm
suffix          "o=OPS"
suffix          "o=OPS-Mail"
suffix          "o=OCE"
directory       /usr/local/openldap/tmp
rootdn          <cut out>
rootpw          <cut out>
cachesize       10000
index           cn,sn,givenname,c,ou    pres,eq,approx
index           default none
-----------

ldif-data:
-----------
dn: o=OPS
objectclass: top
objectclass: organization
classname: organizations
o: OPS
description: OPS Deutschland
source: db

dn: c=Poing, o=OPS
objectclass: top
objectclass: country
classname: countries
c: Poing
cn: Poing
o: OPS
description: Poing
source: db

-----------------