Red Hat Bugzilla – Bug 196754
OpenLDAP database becomes corrupt, possibly after hard reset
Last modified: 2007-11-30 17:11:36 EST
Description of problem:
I have a system that runs slapd to provide LDAP to my network. Occasionally, I
find that the LDAP database becomes corrupt. This seems to happen after a hard
reset (i.e., a power failure.) The system has SELinux enforcing its targeted
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Perform a hard reset with the LDAP server running
# /etc/init.d/ldap start
Checking configuration files for slapd: bdb_db_open: unclean shutdown detected:
bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2)
Expect poor performance for suffix dc=flyn,dc=org.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if errors
bdb(dc=flyn,dc=org): PANIC: fatal region error detected; run recovery
bdb_db_open: Database cannot be opened, err -30974. Restore from backup!
bdb(dc=flyn,dc=org): DB_ENV->lock_id_free interface requires an environment
configured for the locking subsystem
backend_startup_one: bi_db_open failed! (-30974)
slap_startup failed (test would succeed using the -u switch)
stale lock file may be present in /var/lib/ldap [WARNING]
Created attachment 131573 [details]
Corrupt LDAP database
This is the corrupt database. Restoring a previous, known good database allow
slapd to run.
openldap-servers-2.3.30-2.fc6 has improved startup checks and recovery, but
sometimes it's simply not possible to fully recover the database automatically -
manual attention is needed.