0

When I run :

    #slaptest 

it says "config file testing succeeded"

If I run

     #slapd -f slapd.conf -d 256

I got:

    buildd@lamiak:/build/buildd/openldap-2.4.31/debian/build/servers/slapd
    53d0762e bdb(dc=mydomain,dc=com): Program version 5.1 doesn't match environment version 6.1
    53d0762e bdb_db_open: database "dc=mydomain,dc=com" cannot be opened, err -30969. Restore from backup!
    53d0762e bdb(dc=mydomain,dc=com): txn_checkpoint interface requires an environment configured for the transaction subsystem
    53d0762e bdb_db_close: database "dc=mydomain,dc=com": txn_checkpoint failed: Invalid argument (22).
    53d0762e backend_startup_one (type=bdb, suffix="dc=mydomain,dc=com"): bi_db_open failed! (-30969)
    53d0762e bdb_db_close: database "dc=mydomain,dc=com": alock_close failed
    53d0762e slapd stopped.

Does anyone know what may cause the problem?

Greg Askew
  • 34,339
  • 3
  • 52
  • 81
lightlid
  • 1
  • 2
  • My spidey-sense tingles and tells me you have copied your LDAP datafiles from some other server which uses newer version of BerkeleyDB than your current setup. Don't just copy files around like that, use `slapcat` like `rtandy` asked you to do. :) – Janne Pikkarainen Aug 05 '14 at 06:18

1 Answers1

0

The message

Program version 5.1 doesn't match environment version 6.1

says that your slapd is linked against Berkley DB 5.1, but the database it's trying to open was last used with Berkeley DB 6.1.

BDB 6.1 has never been included in Ubuntu. Did you build your own openldap at some point, linked against BDB 6.1, and now you're trying to revert to the Ubuntu package?

The way out of this situation is to dump the database using an appropriately built slapcat(8) (that is, one using BDB 6.1), and reload it using a slapadd(8) built the same way as the slapd(8) you eventually plan to use. (For an example of that, see the slapd maintainer scripts in /var/lib/dpkg/info.)

rtandy
  • 336
  • 1
  • 5