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

multiple subordinates and shm_key - not a good idea



I am using openldap 2.3.21 and bdb 4.4.20 (both compiled 64-bit) on solaris 10.

It seems that using multiple shm_keys in slapd.conf with many
subordinate databases results in unusable data.  I'm about to try and
re-import with the same shm_key on all of the subordinates.  (ugh!)

I haven't been saving all of my logs (sorry) but this is how I got there:

database bdb
shm_key 1
suffix "ou=foo,dc=example,dc=com"
subordinate
rootdn "cn=ldapadmin,dc=example,dc=com"
directory /db/ou=foo
index objectclass eq

database bdb
shm_key 2
suffix "ou=bar,dc=example,dc=com"
subordinate
rootdn "cn=ldapadmin,dc=example,dc=com"
directory /db/ou=bar
index objectclass eq

database bdb
shm_key 3
suffix "ou=moo,dc=example,dc=com"
subordinate
rootdn "cn=ldapadmin,dc=example,dc=com"
directory /db/ou=moo
index objectclass eq

database bdb
shm_key 4
suffix "dc=example,dc=com"
rootdn "cn=ldapadmin,dc=example,dc=com"
rootpw somepass
directory /db
index objectclass eq

The first time I ran db_recover, it complained.  The second time, it
didn't complain, but my directory would crash.
So.. I tried a few things, none of which worked:
I tried adding set_shm_key to my DB_CONFIG and running db_recover -e,
which gave some __db files, but still didn't allow slapd to run.
(although db_stat -e started to work)

Some of the errors I got were: (first try after initial db_recover)
bdb(ou=foo,dc=example,dc=com): unable to join the environment
bdb_db_open: Database cannot be opened, err -30974. Restore from backup!
bdb(ou=foo,dc=example,dc=com): DB_ENV->lock_id_free interface requires
an environment configured for the locking subsystem
bdb(ou=foo,dc=example,dc=com): txn_checkpoint interface requires an
environment configured for the transaction subsystem
bdb_db_close: txn_checkpoint failed: Invalid argument (22)
backend_startup_one: bi_db_open failed! (-30974)
bdb_db_close: alock_close failed
slapd stopped.

(second try after f-ing around a little bit)
bdb(ou=foo,dc=example,dc=com): shmget: key: 3: shared system memory
region already exists
bdb(ou=foo,dc=example,dc=com): PANIC: Resource temporarily unavailable
bdb(ou=foo,dc=example,dc=com): unable to join the environment
bdb_db_open: Database cannot be opened, err -30974. Restore from backup!
...(repeat from first errors)

After trying the set_shm_key in DB_CONFIG:
bdb(ou=foo,dc=example,dc=com): /db/ou=foo/__db.001: existing
environment not created in system memory: Invalid argument
bdb_db_open: Database cannot be opened, err 22. Restore from backup!
bdb(ou=foo,dc=example,dc=com): DB_ENV->lock_id_free interface requires
an environment configured for the locking subsystem