[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Problem unexpected failing slapd

Sorry, I think I found a way to start slapd with gdb. The main mistake I made was using uid openldap. It should be run as root. # gdb -q -x /root/gdb.init --args /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf -l local5

    handle all nostop

This way I can modify the start-stop script. With a restart there is no need for user intervention.

Now it runs and functions. I assume this is the way Howard Chu suggests. Let's wait and see what happens.

Op 28-2-2011 12:10, Ruud Baart schreef:

Op 28-2-2011 3:00, Howard Chu schreef:
Ruud Baart wrote:
For a customer we use LDAP for many years. Last year suddenly the slapd
service just stopped without any traces in the logfiles. After a restart
of slapd everything works fine again. But the problem was there: it was
not an incident, now and then slapd just stops and always without any
traces in the logfiles. Sometime three times a day, sometime a week
without a failure. I can't find a pattern or any relation to any other
service on the linux server.

Attach to the running slapd with gdb, type
    handle all nostop
and let it run. If there's a crash you'll see what happened in gdb.
I tried it but I don't get this working. I have no experience with gdb. I assume I do something wrong.

Normally slapd daemon runs like this on a test machine
/usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf -l local5

If I try this running attached to gdb:
su openldap -s /bin/bash
gdb --args /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf -l local5
GNU gdb (GDB) 7.0.1-debian
This GDB was configured as "i486-linux-gnu".
Reading symbols from /usr/sbin/slapd...(no debugging symbols found)...done.
(gdb) handle all nostop
Signal        Stop      Print   Pass to program Description
SIGHUP        No        Yes     Yes             Hangup
SIGQUIT       No        Yes     Yes             Quit
EXC_EMULATION No        Yes     Yes             Emulation instruction
EXC_SOFTWARE No Yes Yes Software generated exception
EXC_BREAKPOINT No       Yes     Yes             Breakpoint
(gdb) continue
The program is not being run.
(gdb) run
Starting program: /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf -l local5
[Thread debugging using libthread_db enabled]

Program exited with code 01.

At this point I have no idea what to do.


Met vriendelijke groet/Regards,

Ruud Baart<R.J.Baart@Prompt.NL>
Kerkstraat 173, 5261 CW  Vught
Tel: +31 73 6567041

www.prompt.nl - www.netwerkmonitoring.eu

Voor vragen en ondersteuning: support@prompt.nl