OpenLDAP Not working from power outage

I am in a situation that the Nethserver I use for email had lost power due to someones carelessness this am unplugging the server from the battery. The server came up but is running slow. No users can log in including the admin on all services (Webmail, SOGo and owncloud) as well as user admin cannot log into the admin console. I can however log in as root.
The services list shows
-slapd (openldap) enabled but stopped,
-nslcd (Local LDAP name service) enabled but stopped
-lsm (Link Status Monitor) enabled but stopped (normal operation showed this anyhow)
-fetchmail enables but stopped

I would assume most the problem lays with openldap as when I click on mail quota it says empty table. I have checked all the directories that mail is in and I see the mail there.

The system log for /var/log/slapd show this:

Feb 1 16:31:50 mail slapd[6969]: auxpropfunc error invalid parameter supplied
Feb 1 16:31:50 mail slapd[6969]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: ldapdb

Upon trying to restart slapd from command line it immediately fails. I can view users but cannot edit or change.
I have already tried rebooting as well as restore from the config backup from 2 days ago (when the full backup took place)

Help?!?

Try to start it on foreground:

 /usr/sbin/slapd -d 64 -h "ldapi:/// ldap:///" -u ldap -g ldap

Let’s see what it spits out

[root@mail ~]# /usr/sbin/slapd -d 64 -h “ldapi:/// ldap:///” -u ldap -g ldap
56b0dcdf @(#) $OpenLDAP: slapd 2.4.40 (Nov 10 2015 09:41:16) $

mockbuild@c6b8.bsys.dev.centos.org:/builddir/build/BUILD/openldap-2.4.40/openldap-2.4.40/build-servers/servers/slapd
56b0dcdf loaded module /usr/lib64/openldap/rwm.la
56b0dcdf module /usr/lib64/openldap/rwm.la: null module registered
56b0dcdf index objectClass 0x0006
56b0dcdf index cn 0x0716
56b0dcdf index uid 0x0716
56b0dcdf index uidNumber 0x0006
56b0dcdf index gidNumber 0x0006
56b0dcdf index mail 0x0716
56b0dcdf index ou 0x0716
56b0dcdf index sn 0x0716
56b0dcdf index givenName 0x0716
56b0dcdf index loginShell 0x0006
56b0dcdf index memberUid 0x0716
56b0dcdf index nisMapName 0x0716
56b0dcdf index nisMapEntry 0x0716
56b0dcdf bdb_db_open: warning - no DB_CONFIG file found in directory /var/lib/ldap: (2).
Expect poor performance for suffix “dc=directory,dc=nh”.
56b0dcdf bdb(dc=directory,dc=nh): unable to allocate memory for mutex; resize mutex region
56b0dcdf bdb_db_open: database “dc=directory,dc=nh” cannot be opened, err 12. Restore from backup!
56b0dcdf bdb(dc=directory,dc=nh): txn_checkpoint interface requires an environment configured for the transaction subsystem
56b0dcdf bdb_db_close: database “dc=directory,dc=nh”: txn_checkpoint failed: Invalid argument (22).
56b0dcdf backend_startup_one (type=bdb, suffix=“dc=directory,dc=nh”): bi_db_open failed! (12)
56b0dcdf bdb_db_close: database “dc=directory,dc=nh”: alock_close failed
56b0dcdf slapd stopped.

My last full backup was from Saturday. I spun up a vm and restored to it and all works. I tried running a restore-config but no dice. Perhaps I should do a restore-data?

This thread could be relevant

http://www.openldap.org/lists/openldap-technical/201004/msg00070.html

I ended up rebuilding the machine and running a restore from backup. I first did this in a VM and found the best way is command line for all restore-config then restore data. The system tends to hang up in the GUI on both the Virtual and Physical. Lessons learned I found the importance of adding inclusive directories for the certificates and all the various rebranding as well as Journaling to an internal account then pop access to external server (I used Gmail) as I lost all emails that were received before the next daily backup. :frowning: At any rate thanks for trying to help but Im still wondering how the slapd database was up and gone after that reboot. Wasn’t corrupt it is was gone!

Why? Web restore is not working very well?

Yes, you have to backup every customizations or use template-custom :wink: