[EMAIL PROTECTED] wrote:
Quoting Howard Chu <[EMAIL PROTECTED]>:

From: [EMAIL PROTECTED]
Date: Tue, 27 Nov 2007 15:27:47 +0100

Hi all,

Our clients live server (Redhat) experienced some problems this =20
morning, and as a result they had to restart it. But apparently ldap =20
wasn't able to do everything it wanted before it got killed, because =20
during bootup it said:

Checking configuration files for : bdb_db_open: unclean shutdown =20
detected; attem
pting recovery.
bdb_db_open: Recovery skipped in read-only mode. Run manual recovery =20
if errors a
re encountered.

Seems like a custom install; that message comes from OpenLDAP 2.3+ and
as far as I know RedHat has only bundled OpenLDAP 2.2 and older so far.
(Of course it's possible that they've updated recently, I dunno.) But
since you haven't given specific version numbers of either RedHat or
the LDAP software that's just a guess.

Yes, we installed a newer version of OpenLdap after recommendations =20
from this mailinglist (if I remember correctly). We use OpenLdap =20
2.3.38 and Red Hat Enterprise Linux ES release 4 (Nahant Update 5).

1. How come db_recover couldn't fix this problem? It said I should run =20
a catastrophic recovery, but I was doing that! Very strange...

Most likely you were using a version of db_recover that didn't match
the version of BerkeleyDB that OpenLDAP was using.

2. If ldap now is working, and we have a full backup of the bdb =20
database files, do I need any of the old transaction files (including =20
the currupt one, 122)?

When I run db_recover -V it prints:
Sleepycat Software: Berkeley DB 4.2.52: (December 11, 2004)

How do I check what version of BerkeleyDB that our OpenLDAP is using?

3. How come this "unclean shutdown detected" error can make the hole =20
system halt during startup? How can I make it work again?

Sounds like a bug in your startup script. Most likely it's invoking
slaptest and getting an error there, and then giving up instead of
starting slapd at that point. In My Opinion using slaptest to verify
your configuration syntax in the startup script is stupid, and far too
late to be checking. You should just delete/comment that out and have
it run slapd unconditionally. You should be checking the configuration
integrity right after making a change, not during system startup.
Normally slapd (in OpenLDAP 2.3+) will perform whatever recovery is
necessary automatically. The "run manual recovery" message above is
deceptive, but slapd itself will never output that message. (But
slaptest or slapcat may.) So once again, there's something running in
your startup script before the actual slapd invocation that's causing
this failure, and it quite plainly doesn't belong in the script.

Ok, yes the ldap script runs slaptest. But I'm almost certain that =20
this line was included in the ldap script from the old version as =20
well, so we haven't added this line our selfs.

You can see our ldap.sh file here:

http://pastebin.com/m6c3ca9e1

So I assume that you mean that I can delete lines 53-53, is that right?

Regards
/Jimi

P.S. Off topic question: how come this mailing list doesn't put the mailinglist email in the reply-to header? I have now emailed the person I'm anwering, instead of emailing the list, two times in this discussion because of this. D.S.

---

Hi,

I had this same problem with FreeBSD 6.2 and OpenLDAP 2.4.6, and after
searching everywhere, I found that the problem is in fact an unclean shutdown
forced by the "startup" script (/usr/local/etc/rc.d/slapd stop)

Carefully looking at the code, the script kills the daemon and waits for
a small period of and then starts killing (-9) the remaining processes (yuck!).
This should work, but somehow it doesn´t wait enough time.

I "fixed" this problem by modifying the shell options adding a (-x), which
forces a slower execution:

#!/bin/bash -x


best regards,

--
MSc. Marcelo Maraboli Rosselott
Jefe Area de Redes y Comunicaciones  (Network & UNIX Systems Engineer)
Ingeniero Civil Electronico, CISSP  (MSc., Electronic Engineer, CISSP)

Direccion Central de Servicios Computacionales (DCSC)
Universidad Tecnica Federico Santa Maria         phone: +56 32 2654071
Chile.    http://www.usm.cl                 http://elqui.dcsc.utfsm.cl

---
You are currently subscribed to [EMAIL PROTECTED] as: [EMAIL PROTECTED]
To unsubscribe send email to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the 
SUBJECT of the message.

Reply via email to