[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
multiple subordinates and shm_key - not a good idea
- To: "OpenLDAP Software List" <openldap-software@OpenLDAP.org>
- Subject: multiple subordinates and shm_key - not a good idea
- From: "matthew sporleder" <msporleder@gmail.com>
- Date: Wed, 26 Apr 2006 11:51:07 -0400
- Content-disposition: inline
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DHRgaMktiW3yneCmMYJqWFf+7wEzh1GzCQf5EwS3NgbBNyZtVS5A+x93Rh2SJhxKnILL2atIWnGrjX+02HbSsjdU9tj6zcuWlsBMG5HTnsLsvE9REGnnxw4CV3tzbZJR1Fj6+KkhNXfdWHxuhP3feIfRxRTnxRjDpP1FYSzu4JI=
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