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 policy. Version-Release number of selected component (if applicable): openldap-servers-2.3.19-4 How reproducible: Sometimes Steps to Reproduce: Perform a hard reset with the LDAP server running Actual results: # /etc/init.d/ldap start Checking configuration files for slapd: bdb_db_open: unclean shutdown detected: attempting recovery. 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 are encountered. 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) [FAILED] stale lock file may be present in /var/lib/ldap [WARNING] Expected results: Additional info:
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.