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

Re: slapd couldn't start



Quanah Gibson-Mount wrote:


--On Wednesday, October 12, 2005 10:33 PM +0800 Gazali <gazali@gmail.com> wrote:

Hi,all.
    I'm using openldap2.2.20&Berkeley DB4.2.52 at RH7.3.It had worked
well some months,but now,something had happened.slapd couldn't start.
   When I typed 'slapd -d 5',it showed:
--------------------------------------
    slapd startup: initiated.
backend_startup: starting "o=testca"
bdb_db_open: o=testca
bdb_db_open: dbenv_open(/var/lib/ldap)
bdb(o=testca): Ignoring log file: /var/lib/ldap/log.0000000020: magic
number 0, not 40988
bdb(o=testca): DB_ENV->log_put: 20: Invalid argument
bdb_db_open: db_open(/var/lib/ldap) failed: Invalid argument (22)
backend_startup: bi_db_open failed! (22)
slapd shutdown: initiated
====> bdb_cache_release_all
slapd shutdown: freeing system resources.
bdb(o=testca): Ignoring log file: /var/lib/ldap/log.0000000020: magic
number 0, not 40988
bdb(o=testca): DB_ENV->log_put: 20: Invalid argument
bdb(o=testca): txn_checkpoint: failed to flush the buffer cache Invalid
argument bdb_db_destroy: txn_checkpoint failed: Invalid argument (22)
bdb(o=testca): Database handles open during environment close
bdb(o=testca): Ignoring log file: /var/lib/ldap/log.0000000020: magic
number 0, not 40988
bdb(o=testca): DB_ENV->log_put: 20: Invalid argument
bdb_db_destroy: close failed: Invalid argument (22)
slapd stopped.
connections_destroy: nothing to destroy.
-------------------------------------------------------------
    Is there something wrong with the DB? Can anyone tell me how to
fix it and let slapd start?
    thank you.

Try running db_recover, but this looks somewhat like you have different BDB libraries than before.


--Quanah

It looks more like somebody manually truncated the log files. A regular db_recover won't help here, maybe a catastrophic recovery will. You might want to ask in the comp.databases.berkeley-db newsgroup about how to recover when your log files have been manually erased. And you definitely need to read the SleepyCat documentation, and make sure nobody makes that same mistake again.

--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/