Hi,
I am getting the below error while starting openLDAP.
bdb_db_open: alock package is unstable backend_startup_one: bi_db_open failed! (-1) slapd shutdown: initiated ====> bdb_cache_release_all ====> bdb_cache_release_all ====> bdb_cache_release_all slapd destroy: freeing system resources. slapd stopped. connections_destroy: nothing to destroy.
However, if I am using sudo access, I get no error and could successfully start the server and search the DB.
Could anyone please help let me know what the cause for this error is ?
I am using Berkeley DB 4.4.20 OpenLDAP version : 2.3.39
Thanks, Sumith.
On Tue, 15 Apr 2008, Sumith Narayanan wrote:
I am getting the below error while starting openLDAP.
bdb_db_open: alock package is unstable
...
However, if I am using sudo access, I get no error and could successfully start the server and search the DB.
The files in the openldap database directory should be owned by the user that slapd will be run as. For example, if you run slapd as root with "-u slapd" then the files and directory should be owned by user "slapd".
(Programs that access the database directly (e.g., slapcat, db_stat) should be run as that same user so that they don't create files such as txn logs with the wrong ownership. If slapd is running and you run db_stat as root and it creates a txn log file as root, then slapd will panic and will refuse to (re)start until you fix the ownership. I've seen that happen on a completely different project using BDB.)
So, what arguments are you invoking slapd with and what are the permissions and ownerships of the database directory and the files inside it?
Philip Guenther
Thanks Philip..
I thought I had already changed the ownership of all the files recursively to the user which I am using to run openLDAP , but it was not so. Some BDB db files were still owned by root. I changed that to the user I use to start the slapd and it worked fine.
-Sumith.
On 4/15/08, Philip Guenther guenther+ldapsoft@sendmail.com wrote:
On Tue, 15 Apr 2008, Sumith Narayanan wrote:
I am getting the below error while starting openLDAP.
bdb_db_open: alock package is unstable
...
However, if I am using sudo access, I get no error and could successfully start the server and search the DB.
The files in the openldap database directory should be owned by the user that slapd will be run as. For example, if you run slapd as root with "-u slapd" then the files and directory should be owned by user "slapd".
(Programs that access the database directly (e.g., slapcat, db_stat) should be run as that same user so that they don't create files such as txn logs with the wrong ownership. If slapd is running and you run db_stat as root and it creates a txn log file as root, then slapd will panic and will refuse to (re)start until you fix the ownership. I've seen that happen on a completely different project using BDB.)
So, what arguments are you invoking slapd with and what are the permissions and ownerships of the database directory and the files inside it?
Philip Guenther
openldap-software@openldap.org