Check the ownership of your ldap dbase directory.  I’ve seen the same errors as your described then after checking the ownership had changed to root:root instead of ldap:ldap.

 

From: openldap-technical-bounces@OpenLDAP.org [mailto:openldap-technical-bounces@OpenLDAP.org] On Behalf Of Eileen(=^?^=)
Sent: Tuesday, June 24, 2014 9:05 PM
To: Alessandro Avagliano; openldap-technical
Subject: Re: slapd dead. pls advise how I can restart it

 

 

hi Alessandro,‍

   

 thank you for the reply. I have some questions in here, pls kindly bear me , i have not so much knowledge with ldap and BDB. 

 

1. For command db5.1_recover . How to use this command, and what is the documentation can teach me how to use this db_recover. How can i know what is the BDB version i use in my LDAP servicer?‍‍

2. How to backup the db and make perform regular backups? this is important for me to avoid next blackout.

3. I sad to say i haven't any  slapd replica , so i can't run the db_recover?  ‍

 

------------------ Original ------------------

From:  "Alessandro Avagliano";<alessandro@avagliano.berlin>;

Date:  Tue, Jun 24, 2014 11:19 PM

To:  "openldap-technical"<openldap-technical@openldap.org>;

Subject:  Re: slapd dead. pls advise how I can restart it

 

Hi,

On 24/06/14 16:31, Dominik George wrote:
> Of course, you have a slapcat backup Form yesterday, so just remove
> the stuff and slapadd, right ;)? -nik
(If you don't have a backup... )
...depending on your operating system and OpenLDAP version installed,
you should have on your system a tool called  db<version>_recover

 e.g.: db5.1_recover, db4.8_recover and so on.

(from the man page:)
"db5.1_recover - Restore the database to a consistent state

The  db5.1_recover utility must be run after an unexpected application,
Berkeley DB, or system failure to
restore the database to a consistent state. All committed transactions
are  guaranteed  to  appear  after
db5.1_recover has run, and all uncommitted transactions will be
completely undone."


Be sure to make a backup copy of your db before running it, and that the
version of the db utilities that you are running matches your BDB
version (I haven't tried to recover it using different utilities/db
version).

If you manage to restore your db, make sure you perform regular backups
and that you have at least 1 slapd replica running.... they can both
help you to restore the system in such situations :)

Kind Regards,
Alessandro