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

RE: dn2id could not open dn2id.dbb



I'm running slapd as root.  It's definitely not a permissions issue.  Here's
the output 
from slapd after running this query: ldapsearch -D "uid=admin, o=Digital
Insight" -w passwd -b "rtn=987654321,o=Digital Insight" -s sub
"rtn=98765432321"

*************
do_bind
do_bind: version 2 dn (uid=admin, o=Digital Insight) method 128
dn2entry_r: dn: "UID=ADMIN,O=DIGITAL INSIGHT"
=> dn2id( "UID=ADMIN,O=DIGITAL INSIGHT" )
=> ldbm_cache_open( "/usr/local/ldbmdir/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (opened 0)
<= dn2id 2
=> id2entry_r( 2 )
=> ldbm_cache_open( "/usr/local/ldbmdir/id2entry.dbb", 7, 600 )
<= ldbm_cache_open NULL "/usr/local/ldbmdir/id2entry.dbb" errno 9 reason
"Bad file number")
Could not open id2entry.dbb
dn2entry_r: no entry for valid id (2), dn "UID=ADMIN,O=DIGITAL INSIGHT"
dn2entry_r: dn: "O=DIGITAL INSIGHT"
=> dn2id( "O=DIGITAL INSIGHT" )
=> ldbm_cache_open( "/usr/local/ldbmdir/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/ldbmdir/id2entry.dbb", 7, 600 )
<= ldbm_cache_open NULL "/usr/local/ldbmdir/id2entry.dbb" errno 9 reason
"Bad file number")
Could not open id2entry.dbb
dn2entry_r: no entry for valid id (1), dn "O=DIGITAL INSIGHT"
do_bind: bound "uid=admin, o=Digital Insight" to "uid=admin, o=Digital
Insight"
send_ldap_result 0::
do_search
using base "RTN=987654321,O=DIGITAL INSIGHT"
subtree_candidates: base: "RTN=987654321,O=DIGITAL INSIGHT" lookupbase
dn2entry_r: dn: "RTN=987654321,O=DIGITAL INSIGHT"
=> dn2id( "RTN=987654321,O=DIGITAL INSIGHT" )
=> ldbm_cache_open( "/usr/local/ldbmdir/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 3
=> id2entry_r( 3 )
=> ldbm_cache_open( "/usr/local/ldbmdir/id2entry.dbb", 7, 600 )
<= ldbm_cache_open NULL "/usr/local/ldbmdir/id2entry.dbb" errno 9 reason
"Bad file number")
Could not open id2entry.dbb
dn2entry_r: no entry for valid id (3), dn "RTN=987654321,O=DIGITAL INSIGHT"
dn2entry_r: dn: "O=DIGITAL INSIGHT"
=> dn2id( "O=DIGITAL INSIGHT" )
=> ldbm_cache_open( "/usr/local/ldbmdir/dn2id.dbb", 7, 600 )
<= ldbm_cache_open (cache 0)
<= dn2id 1
=> id2entry_r( 1 )
=> ldbm_cache_open( "/usr/local/ldbmdir/id2entry.dbb", 7, 600 )
<= ldbm_cache_open NULL "/usr/local/ldbmdir/id2entry.dbb" errno 9 reason
"Bad file number")
Could not open id2entry.dbb
dn2entry_r: no entry for valid id (1), dn "O=DIGITAL INSIGHT"
send_ldap_result 32::
do_unbind
*******************************************

Any ideas?  I have no idea why it's saying "Could not open id2entry/dbb".
It's not a permissions issue though, and I can ldbmcat the file and see the
data that it contains.  I'm at a loss here... 
-Andrew



-----Original Message-----
From: Neil Hunter [mailto:neil.hunter@theplanet.net]
Sent: Friday, March 31, 2000 1:05 AM
To: Andrew Kornuta
Cc: OpenLDAP-software
Subject: RE: dn2id could not open dn2id.dbb


On Thu, 30 Mar 2000, Andrew Kornuta wrote:

> The directory that I am storing all ldbm files in (as specified by the 
> directory pragma in slapd.conf) is /usr/local/ldbmdir, which exists and 
> contains the following files: 
> artdev:/usr/local/ldbmdir# ls -la
> total 112
> drwxr-xr-x   2 root     system       512 Mar 29 15:30 ./
> drwxr-xr-x  19 root     system       512 Mar 27 15:07 ../
> -rw-r--r--   1 root     system         3 Mar 29 16:59 NEXTID
> -rw-------   1 root     system      2048 Mar 29 15:30 dn.dbb

Looking at this, only root is capable of reading the files - what user does
the
slapd run as?

> However, when I do an "ldbmcat" on the files, the ONLY one that contains 
> something other than blank lines is "id2entry.dbb", which is why, I'm
> assuming, 
> slapd complains abotu the dn2id.dbb problem.  Is this indicitave of some 
> other problem, perhaps with my naming scheme?

Not really. id2entry.dbb contains the actual directory entries themselves
and
maps the internally allocated ID numbers to the attributes and values for
that
entry. The other .dbb files are used to obtain possible ID's based on the DN
or
other defined indexes. id2entry is the only one of the database files that
returns easily recognisable data from ldbmcat as far as I can see.

Try making all your database files readable (chmod 644 *.dbb) and see if
that
helps at all. If it does you know it's a permission issue.

Can you also check the output from slapd -d 1 for the ldbm_cache_open lines
after a query and check that the path shown is /usr/local/ldbmdir.

Cheers,
  Neil

----------------------------------------------------------------------------
---
  Neil Hunter                                     Tel:    +44 (0)113 234
6073
  Internet Systems Developer                      Fax:    +44 (0)113 234
6065
  Planet Online Limited                           Mobile: +44 (0)7787 100
649
----------------------------------------------------------------------------
---