Today I updated several FreeBSD 7.1-STABLE servers and so I did on one of our OpenLDAP servers. The server was runnig OpenLDAP 2.4.15 with Cyrus SASL2 support and DB backend was DB 4.6 as from the ports.
First, I made a backup from the OpenLDAP database via slapcat -l file.ldif.
I updated from DB 4.6 o DB 4.7 and rebuilt every port that relied on DB 4.6, deleted DB 4.6 libraries and other files and then rebuilt OpenLDAP 2.4.15.
When trying to recover the database via 'slapadd -c -l file.ldif' and/or trying to restart the OpenLDAP server, I get this error message:
Starting slapd. @(#) $OpenLDAP: slapd 2.4.15 (Mar 12 2009 13:06:18) $
root@fu-testbett:/usr/ports/net/openldap24-server/work/openldap-2.4.15/servers/slapd bdb(dc=geoinf,dc=fu-berlin,dc=de): unable to initialize mutex: Invalid argument bdb(dc=geoinf,dc=fu-berlin,dc=de): unable to destroy mutex: Invalid argument bdb(dc=geoinf,dc=fu-berlin,dc=de): PANIC: Invalid argument bdb(dc=geoinf,dc=fu-berlin,dc=de): unable to join the environment hdb_db_open: database "dc=geoinf,dc=fu-berlin,dc=de" cannot be opened, err -30974. Restore from backup! bdb(dc=geoinf,dc=fu-berlin,dc=de): txn_checkpoint interface requires an environment configured for the transaction subsystem bdb_db_close: database "dc=geoinf,dc=fu-berlin,dc=de": txn_checkpoint failed: Invalid argument (22). backend_startup_one: bi_db_open failed! (-30974) bdb_db_close: database "dc=geoinf,dc=fu-berlin,dc=de": alock_close failed slapd stopped.
So far. At this very moment I feel like a dead man in the water. I searched the web and tried to find out what LDAP is complaining about, but no success so far. Is anybody out here with some hints? Please eMail me,
thanks in advance,
Oliver
I'm a big believer in checking the obvious first...are you reusing the database and/or logs directory from your 4.6 installation?
i.e., rm data/base/*db* data/base/alock data/logs/log*
being VERY VERY careful to NOT delete the "file.ldif"
then slapadd file.ldif again, to your known-clean directory?
Aaron Richton wrote:
I'm a big believer in checking the obvious first...are you reusing the database and/or logs directory from your 4.6 installation?
i.e., rm data/base/*db* data/base/alock data/logs/log*
being VERY VERY careful to NOT delete the "file.ldif"
then slapadd file.ldif again, to your known-clean directory?
The backup LDIF files are carefully inserted into a SVN repository and *NOT* in the DB path, they are stored/dumped elsewere.
Yes, all databse-keeping directories are cleaned before I tried recovering - the folders are empty.
Due to the fact I configure slapd via slapd.d folder, what's about the schemata? I suspected some faulty schema.ldif files. trying to start a 'clean' slapd (moving all the configuraion stuff out of the way) doesn't help much. Something seems very, very strange here :-(
Schema parsing (which you can check with "-d config") isn't going to affect a bdb_open. There's a chance that your db4 libraries aren't appropriate for your system (I note the mutex error; perhaps you or your distro autoconf'd the wrong option for your architecture).
Aaron Richton wrote:
Schema parsing (which you can check with "-d config") isn't going to affect a bdb_open. There's a chance that your db4 libraries aren't appropriate for your system (I note the mutex error; perhaps you or your distro autoconf'd the wrong option for your architecture).
Great! Thanks for *this* hint. Indeed, there was an issue in the centralised configuration we used for our site! Now everything runs smooth ...
Regards, Oliver
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
O. Hartmann wrote:
Today I updated several FreeBSD 7.1-STABLE servers and so I did on one of our OpenLDAP servers. The server was runnig OpenLDAP 2.4.15 with Cyrus SASL2 support and DB backend was DB 4.6 as from the ports.
Oh sad...
Make sure to backup /var/db/openldap-data (as well as other data), then install OpenLDAP server built with DB 4.6, slapcat to export the data, then reinstall OpenLDAP with DB 4.7, finally, re-import the data.
Cheers, - -- Xin LI delphij@delphij.net http://www.delphij.net/ FreeBSD - The Power to Serve!
openldap-software@openldap.org