View previous topic :: View next topic |
Author |
Message |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Thu May 14, 2009 2:56 pm Post subject: Openldap - Unrecognized database type (hdb) |
|
|
Hi, i tried install openldap using http://www.gentoo.org/doc/en/ldap-howto.xml but in Code Listing 2.6: Starting SLAPd step i have this problem:
Code: | gentoo-clear ~ # /etc/init.d/slapd start
* Starting ldap-server ...
Unrecognized database type (hdb) |
and /var/log/messages tells me this:
Code: | May 14 17:47:14 gentoo-clear slapd[20019]: @(#) $OpenLDAP: slapd 2.3.43 (May 14 2009 17:28:16) $ root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd
May 14 17:47:14 gentoo-clear slapd[20019]: /etc/openldap/slapd.conf: line 62: <database> failed init (hdb)!
May 14 17:47:14 gentoo-clear slapd[20019]: slapd stopped.
May 14 17:47:14 gentoo-clear slapd[20019]: connections_destroy: nothing to destroy. |
do you know what to do with this? Thank you... |
|
Back to top |
|
 |
malern Apprentice


Joined: 19 Oct 2006 Posts: 170
|
Posted: Thu May 14, 2009 4:51 pm Post subject: |
|
|
Have you emerged openldap with the "berkdb" use flag?
Also, could you post your /etc/openldap/slapd.conf? |
|
Back to top |
|
 |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Fri May 15, 2009 6:29 am Post subject: |
|
|
Hi, thanks for rep.
Code: | gentoo-clear ~ # emerge -pv openldap
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] net-nds/openldap-2.3.43 USE="berkdb crypt gdbm perl ssl tcpd -debug -ipv6 -kerberos -minimal -odbc -overlays* -samba -sasl (-selinux) -slp -smbkrb5passwd" 0 kB
Total: 1 package (1 reinstall), Size of downloads: 0 kB
gentoo-clear ~ # |
Code: |
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules:
modulepath /usr/lib/openldap/openldap
# moduleload back_shell.so
# moduleload back_relay.so
# moduleload back_perl.so
# moduleload back_passwd.so
# moduleload back_null.so
# moduleload back_monitor.so
# moduleload back_meta.so
moduleload back_hdb.so
# moduleload back_dnssrv.so
# Sample security restrictions
# Require integrity protection (prevent hijacking)
# Require 112-bit (3DES or better) encryption for updates
# Require 63-bit encryption for simple bind
# security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
access to dn.base="" by * read
access to dn.base="cn=Subschema" by * read
access to *
by self write
by users read
by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# BDB database definitions
#######################################################################
database hdb
suffix "dc=comparex-test,dc=cz"
# <kbyte> <min>
checkpoint 32 30
rootdn "cn=Manager,dc=comparex-test,dc=cz"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
#rootpw secret
rootpw {SSHA}pVZfgCGnUrbBGhc47P3EHaTHbWMscMC9
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/openldap-ldbm
#directory /var/lib/openldap-data
# Indices to maintain
index objectClass eq |
thanks |
|
Back to top |
|
 |
nativemad Developer


Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri May 15, 2009 7:35 am Post subject: |
|
|
Hi,
from the ebuild:
Code: | # HDB is only available with BerkDB
myconf_berkdb='--enable-bdb --enable-ldbm-api=berkeley --enable-hdb=mod'
myconf_gdbm='--disable-bdb --enable-ldbm-api=gdbm --disable-hdb'
|
if you have both (berkdb and gdbm), then hdb will get disabled!
Cheers! _________________ Power to the people! |
|
Back to top |
|
 |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Fri May 15, 2009 8:32 am Post subject: |
|
|
Thanks, but still doesn`t work. Here is what i have:
Code: | USE="-gdbm" emerge openldap
...
* Using Berkeley DB for local backend
* Found db version 4.5
* econf: updating openldap-2.3.43/contrib/ldapc++/config.guess with /usr/share/gnuconfig/config.guess
* econf: updating openldap-2.3.43/contrib/ldapc++/config.sub with /usr/share/gnuconfig/config.sub
* econf: updating openldap-2.3.43/build/config.guess with /usr/share/gnuconfig/config.guess
* econf: updating openldap-2.3.43/build/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=i486-pc-linux-gnu --host=i486-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-static --enable-shared --libexecdir=/usr/lib/openldap --enable-slapd --enable-slurpd --enable-ldbm --enable-bdb --enable-ldbm-api=berkeley --enable-hdb=mod --enable-passwd=mod --enable-phonetic=mod --enable-dnssrv=mod --enable-ldap --enable-meta=mod --enable-monitor=mod --enable-null=mod --enable-shell=mod --enable-relay=mod --enable-perl=mod --disable-sql --enable-crypt --disable-slp --enable-rewrite --enable-rlookups --enable-aci --enable-modules --enable-cleartext --enable-slapi --disable-lmpasswd --enable-dyngroup --enable-proxycache --enable-syncprov --enable-syslog --enable-dynamic --enable-local --enable-proctitle --disable-ipv6 --without-cyrus-sasl --disable-spasswd --enable-wrappers --with-tls
Configuring OpenLDAP 2.3.43-Release ...
...
checking db.h usability... yes
checking db.h presence... yes
checking for db.h... yes
checking for Berkeley DB major version... 4
checking for Berkeley DB minor version... 5
checking for Berkeley DB link (-ldb45)... no
checking for Berkeley DB link (-ldb-45)... no
checking for Berkeley DB link (-ldb-4.5)... yes
checking for Berkeley DB version match... yes
checking for Berkeley DB thread support... yes
checking Berkeley DB version for BDB/HDB backends... yes
...
* Messages for package net-nds/openldap-2.3.43:
* Adding back_dnssrv.so
* Adding back_hdb.so
* Adding back_meta.so |
and still the same
Code: | gentoo-clear ~ # /etc/init.d/slapd start
* Caching service dependencies ... [ ok ]
* Starting ldap-server ...
Unrecognized database type (hdb) [ !! ]
gentoo-clear ~ # |
what i think that is strange is in log:
Code: | May 15 11:20:01 gentoo-clear cron[19177]: (root) CMD (test -x /usr/sbin/run-crons && /usr/sbin/run-crons )
May 15 11:25:56 gentoo-clear slapd[17992]: @(#) $OpenLDAP: slapd 2.3.43 (May 15 2009 11:23:45) $ root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd
May 15 11:25:56 gentoo-clear slapd[17992]: /etc/openldap/slapd.conf: line 62: <database> failed init (hdb)!
May 15 11:25:56 gentoo-clear slapd[17992]: slapd stopped.
May 15 11:25:56 gentoo-clear slapd[17992]: connections_destroy: nothing to destroy |
root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd
Honza |
|
Back to top |
|
 |
nativemad Developer


Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri May 15, 2009 9:27 am Post subject: |
|
|
Hmm... mine is working over here...!??
I've just done a "USE=-gdbm emerge openldap" and it worked...
Could you check that /usr/lib/openldap/openldap/back_hdb.so is a valid symlink and has enough rights for "world" to execute?
It could also be helpful to have a bit more output... -place a "-d 128" in the "OPTS" in /etc/conf.d/slapd. _________________ Power to the people! |
|
Back to top |
|
 |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Fri May 15, 2009 10:59 am Post subject: |
|
|
lrwxrwxrwx 1 root root 22 May 15 11:25 /usr/lib/openldap/openldap/back_hdb.so -> back_hdb-2.3.so.0.2.31 |
|
Back to top |
|
 |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Fri May 15, 2009 11:09 am Post subject: |
|
|
When i append -d 128:
Code: | gentoo-clear ~ # /etc/init.d/slapd start
* Starting ldap-server ...
@(#) $OpenLDAP: slapd 2.3.43 (May 15 2009 11:23:45) $
root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd
Unrecognized database type (hdb)
/etc/openldap/slapd.conf: line 62: <database> failed init (hdb)!
slapd stopped.
connections_destroy: nothing to destroy. [ !! ]
gentoo-clear ~ # |
as i said, the strange thing is this:
root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd
why it execute slapd from this place? |
|
Back to top |
|
 |
nativemad Developer


Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri May 15, 2009 11:19 am Post subject: |
|
|
After i copied your config and tested it, i've found one lovely thing!
WHITESPACES!!
You should not start a new definition in slapd.conf with a whitespace or tab!! These are used for longer statements like acls!!
..another case, where "nothing" can cause trouble!
Cheers and enjoy the Weekend!  _________________ Power to the people! |
|
Back to top |
|
 |
honp Guru

Joined: 25 Sep 2006 Posts: 355 Location: Good old Prague, Czech rep.
|
Posted: Fri May 15, 2009 11:31 am Post subject: |
|
|
Nativemad, thank you very very much, now it works.
When you are in Prague, don`t forgot to contact me, i owe you glass (or more) of beer:)
Honza |
|
Back to top |
|
 |
nativemad Developer


Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Fri May 15, 2009 11:42 am Post subject: |
|
|
Quote: | root@gentoo-clear:/var/tmp/portage/net-nds/openldap-2.3.43/work/openldap-2.3.43/servers/slapd |
I think this is coming from where it is compiled! My production Server also claims that, but it has no portage at all on it!
Ok, hopefully i will be there soon!  _________________ Power to the people! |
|
Back to top |
|
 |
|