1 (edited by thembimoyo 2010-06-17 23:28:10)

Topic: Slapd has stopped Working

I have this error in my Logs;


mail:~# /etc/init.d/slapd restart
Stopping OpenLDAP: slapd.
Starting OpenLDAP: slapd - failed.
The operation failed but no output was produced. For hints on what went
wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
try running the daemon in Debug mode like via "slapd -d 16383" (warning:
this will create copious output).

Below, you can find the command line options used by this script to
run slapd. Do not forget to specify those options if you
want to look to debugging output:
  slapd -g openldap -u openldap -f /etc/ldap/slapd.conf


mail:~# tail -f /var/log/mail.log
Jun 17 17:25:41 mail postfix/proxymap[15720]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=XXX,dc=XXX,dc=org: -1 (Can't contact LDAP server)
Jun 17 17:25:41 mail postfix/trivial-rewrite[18277]: fatal: proxy:ldap:/etc/postfix/ldap_virtual_mailbox_domains.cf(0,lock|fold_fix): table lookup problem
Jun 17 17:25:41 mail postfix/pickup[15713]: warning: 2C56A8EB39DE: message has been queued for 1 days
Jun 17 17:25:41 mail postfix/pickup[15713]: 2C56A8EB39DE: uid=0 from=<root>
Jun 17 17:25:41 mail postfix/proxymap[15719]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=XXX,dc=XXX,dc=org: -1 (Can't contact LDAP server)
Jun 17 17:25:41 mail postfix/proxymap[15719]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=XXX,dc=XXX,dc=org: -1 (Can't contact LDAP server)
Jun 17 17:25:41 mail postfix/cleanup[15717]: warning: 2C56A8EB39DE: virtual_alias_maps map lookup problem for root@domain.org
Jun 17 17:25:41 mail postfix/proxymap[15719]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=XX,dc=XXX,dc=org: -1 (Can't contact LDAP server)
Jun 17 17:25:42 mail postfix/smtpd[15742]: warning: problem talking to service rewrite: Success
Jun 17 17:25:42 mail postfix/master[15711]: warning: process /usr/lib/postfix/trivial-rewrite pid 18277 exit status 1

2

Re: Slapd has stopped Working

Run below command and paste output message here:

# slapd -g openldap -u openldap -f /etc/ldap/slapd.conf -d 256

3 (edited by thembimoyo 2010-06-18 12:47:17)

Re: Slapd has stopped Working

ZhangHuangbin wrote:

Run below command and paste output message here:

# slapd -g openldap -u openldap -f /etc/ldap/slapd.conf -d 256

I dont see any output

mail:~# slapd -g openldap -u openldap -f /etc/ldap/slapd.conf
mail:~#

But I have this in the debug;

cat /var/log/debug
Jun 15 18:19:07 mail slapd[23652]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 16 10:35:16 mail slapd[14195]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 09:05:04 mail slapd[25806]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 09:06:17 mail slapd[28403]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 09:06:35 mail slapd[29969]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 09:20:01 mail slapd[18180]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 17:14:48 mail slapd[19654]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 17:21:06 mail slapd[18394]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:10:51 mail slapd[32595]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:12:19 mail slapd[5777]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:13:40 mail slapd[9612]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:14:03 mail slapd[11448]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:14:28 mail slapd[11894]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 17 18:15:23 mail slapd[21529]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:08:01 mail slapd[7631]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:23:31 mail slapd[22189]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:24:02 mail slapd[1563]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:27:25 mail slapd[15548]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:28:01 mail slapd[17625]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd
Jun 18 06:29:42 mail slapd[22101]: @(#) $OpenLDAP: slapd 2.4.11 (Nov 26 2009 09:17:06) $ ^Iroot@SD6-Casa:/tmp/buildd/openldap-2.4.11/debian/build/servers/slapd

4

Re: Slapd has stopped Working

That means it works. Maybe Debian/Ubuntu try to start openldap too quick after a stop. You can just try:

# /etc/init.d/slapd stop

# ---- Wait for some seconds ----

# /etc/init.d/slapd start

5

Re: Slapd has stopped Working

ZhangHuangbin wrote:

That means it works. Maybe Debian/Ubuntu try to start openldap too quick after a stop. You can just try:

# /etc/init.d/slapd stop

# ---- Wait for some seconds ----

# /etc/init.d/slapd start

Here is what I get after doing the above...

mail:~# /etc/init.d/slapd stop
Stopping OpenLDAP: slapd.
mail:~# /etc/init.d/slapd start
Starting OpenLDAP: slapd - failed.
The operation failed but no output was produced. For hints on what went
wrong please refer to the system's logfiles (e.g. /var/log/syslog) or
try running the daemon in Debug mode like via "slapd -d 16383" (warning:
this will create copious output).

Below, you can find the command line options used by this script to
run slapd. Do not forget to specify those options if you
want to look to debugging output:
  slapd -g openldap -u openldap -f /etc/ldap/slapd.conf
mail:~#

6

Re: Slapd has stopped Working

Try below command as suggested:

# slapd -g openldap -u openldap -f /etc/ldap/slapd.conf -d 16383

Paste error log here.

If it still not work for you, try below command:

# strace -sS -fF slapd -g openldap -u openldap -f /etc/ldap/slapd.conf > /tmp/openldap.log

Paste /tmp/openldap.log here (not as attachment).