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

Re: Starting openldap 2.2.24 with empty bdb database and incomplete slaptest man page



> Hi,
> I'm having the following problems.
> When i try to start a new bdb database in my ldap server I get the
> following:
>
> [root@ventura2 root]# /etc/init.d/ldap start

This tool is not part of the OpenLDAP distribution, so I cannot discuss
its functionality

> Checking configuration files for : slap_startup failed (test would
> succeed using the -u switch)
> [root@ventura2 root]#                                      [FAILED]
>
> When I try to run slaptest, this is what i get:
>
> [root@ventura2 root]# slaptest -d-256
> bdb_db_init: Initializing BDB database
> bdb_db_open: db_open(/var/lib/ldap) failed: No such file or directory (2)
> backend_startup: bi_db_open failed! (2)
> slap_startup failed (test would succeed using the -u switch)

I suggest you add the "-u" switch to your slaptest commend, as suggested
by the tool itself.

> [root@ventura2 root]#
> [root@ventura2 root]# ls -la /var/lib/ldap
> total 392
> drwx------   2 ldap ldap   4096 Mar 31 12:21 .
> drwxr-xr-x  23 root root   4096 Mar 31 12:15 ..
> -rw-------   1 root root  16384 Mar 31 12:21 __db.001
> -rw-------   1 root root 278528 Mar 31 12:21 __db.002
> -rw-------   1 root root  98304 Mar 31 12:21 __db.003
> -rw-------   1 root root 450560 Mar 31 12:21 __db.004
> -rw-------   1 root root  24576 Mar 31 12:21 __db.005
> [root@ventura2 root]#
>  As you can see, the directory does existe and write permissions are
> given to ldap user

The file that's missing is the database itself, i.e. both id2entry.bdb and
dn2id.bdb.

>
> By the way, what means then "-u" switch?

"dry run", i.e. in this case, don't fail if the daabase files cannot be
opened but the configuration is fine.  The error message about being
unable to open the file will still be reported.

> In the man page of slaptest
> that options does appeas.

The man page needs to be updated.  Thanks for reporting.

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it


    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497