Hello.
I'm trying to migrate an OpenLDAP database from one server to another. The old server was using Linux From Scratch and the new Server is using CentOS 5.1. I'm using a "stock" build and doing my best to try and use yum packages where ever possible. The machine was installed with Openldap-servers and openldap-clients installed. Here's my problem.
If I start ldap using the "stock" configuration file, it works fine. When I start it using the config files from the other server, it segfaults.
Here's the ldap.conf file:
BASE dc=eb,dc=loc
URI ldap://127.0.0.1
And here's slapd.conf. You'll notice I've commented out the replication portion of things because this is a test box that doesn't have a "partner" to replicate to.
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/sphinx.schema
include /etc/openldap/schema/samba.schema
include /etc/openldap/schema/qmail.schema
include /etc/openldap/schema/mozilla.schema
include /etc/openldap/schema/pureftpd.schema
#include /etc/openldap/schema/sphinx.schema
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
database bdb
suffix "dc=eb,dc=loc"
rootdn "cn=Manager,dc=eb,dc=loc"
rootpw {SSHA}garbagehere
directory /var/openldap/openldap-data
password-hash {MD5}
password-crypt-salt-format "$1$.8s"
#replogfile /etc/openldap/replog
#updatedn "cn=replicator,dc=eb,dc=loc"
#updateref ldap://10.255.255.30
index objectClass,uidNumber,gidNumber eq
index cn,sn,uid,displayName pres,sub,eq
index memberUid,givenName eq
index sambaSID,sambaPrimaryGroupSID,sambaDomainName eq
index default sub
#access to attrs=userPassword,sambaLMPassword,sambaNTPassword
# by self write
# by anonymous auth
# by dn="cn=replicator,dc=eb,dc=loc" write
# by * none
#
#access to *
# by dn="cn=replicator,dc=eb,dc=loc" write
# by * read
Now, one of the first things I did was copy over the data files from /srv/ldap to /var/openldap. Then I deleted the alock file. Then I chown -R ldap:ldap /var/openldap to allow for permissions. Just to be on the safe side, I also issued a setsebool -R slapd_disable_trans=0 so that way SELinux wouldn't interfere with it.
Now, whenever I try to start it, I get this:
[root@hptestlin openldap]# service ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected; attempting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors are encountered.
[ OK ]
Starting slapd: [ OK ]
slapd or slurpd are not listed in the process list! /var/log/messages shows this:
Feb 13 16:39:02 hptestlin kernel: slaptest[22371]: segfault at 00002aaaae5a0008 rip 00002aaaaad66982 rsp 00007fffc0e08490 error 4
Feb 13 16:39:02 hptestlin kernel: slapd[22379]: segfault at 00002aaaaaacc008 rip 00002aaaaad66982 rsp 00007fff55738dc0 error 4
Doing a slapd_db_recover -v doesn't make any difference.
Lastly, if I attempt to start slapd manually with a -d 4, I get this:
[root@hptestlin openldap-data]# slapd -d 4
@(#) $OpenLDAP: slapd 2.3.27 (Nov 10 2007 09:23:56) $
mockbuild@builder6.centos.org:/builddir/build/BUILD/openldap-2.3.27/openldap-2.3.27/build-servers/servers/slapd
daemon_init: <null>
=> ldap_bv2dn(dc=eb,dc=loc,0)
<= ldap_bv2dn(dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(dc=eb,dc=loc)=0
=> ldap_bv2dn(cn=Manager,dc=eb,dc=loc,0)
<= ldap_bv2dn(cn=Manager,dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=Manager,dc=eb,dc=loc)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=manager,dc=eb,dc=loc)=0
=> ldap_bv2dn(cn=Subschema,0)
<= ldap_bv2dn(cn=Subschema)=0
=> ldap_dn2bv(272)
<= ldap_dn2bv(cn=subschema)=0
bdb_db_open: dc=eb,dc=loc
bdb_db_open: unclean shutdown detected; attempting recovery.
Segmentation fault
I'm at my wits end here. Does anyone have any ideas? Does anyone need more information to be able to help out? I've Googled this with no luck, It always segfaults at the same address.
Your help is highly appreciated.