Description of problem: slapd fails to start on boot. Times out. However, manual restart works fine. Version-Release number of selected component (if applicable): openldap-servers-2.4.31-2.fc17.x86_64 systemd-44-12.fc17.x86_64 How reproducible: Every reboot Steps to Reproduce: 1.Enable slapd 2.reboot 3. Actual results: bash-4.2$ systemctl status slapd.service slapd.service - OpenLDAP Server Daemon Loaded: loaded (/usr/lib/systemd/system/slapd.service; enabled) Active: failed (Result: timeout) since Wed, 06 Jun 2012 16:02:27 +0530; 5min ago Process: 1319 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=killed, signal=TERM) CGroup: name=systemd:/system/slapd.service Expected results: bash-4.2$ systemctl status slapd.service slapd.service - OpenLDAP Server Daemon Loaded: loaded (/usr/lib/systemd/system/slapd.service; enabled) Active: active (running) since Wed, 06 Jun 2012 16:07:52 +0530; 4s ago Process: 3382 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS (code=exited, status=0/SUCCESS) Process: 3346 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=exited, status=0/SUCCESS) Main PID: 3383 (slapd) CGroup: name=systemd:/system/slapd.service └ 3383 /usr/sbin/slapd -u ldap -h ldapi:/// ldap:/// ldaps:/// Additional info: Manual start works fine. bash-4.2$ sudo systemctl start slapd.service System log shows: Jun 6 16:02:27 amd systemd[1]: slapd.service operation timed out. Terminating.
Commenting check-config in /usr/lib/systemd/system/slapd.service makes the problem go away. #ExecStartPre=/usr/libexec/openldap/check-config.sh Should it be a problem once the configuration is done?
As a general rule, problems with specific services failing should be reported first against the services themselves. Reassigning to openldap. This may be caused by slapd.service setting the service timeout very low: TimeoutSec=3
3 seconds should be enough. But you can increase that value and try it. Is something logged in /var/log/messages? What about SELinux, have you checked /var/log/audit/audit.log for AVC denials?
What is the reason for setting such a low timeout? Most services are fine with the default timeout, which is 90 seconds. What makes slapd special in this regard?
Thanks very much. Increasing the timeout to 30 solved the issue. In case it is related to the time shown by systemd-analyze blame: on my system it is: 5084ms slapd.service My apologies for filing the report against systemd.
I think the "TimeoutSec=3" setting originated from a misguided attempt to emulate the default behaviour of killproc from /etc/init.d/functions. Bug 458679 even showed that it is not safe to kill slapd prematurely by SIGKILL, so setting a low timeout seems counter-productive. I recommend just using the default.
OK, we will stick with default. Not sure why we had it there anyway.
Resolved in openldap-2.4.31-3.fc17
openldap-2.4.31-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/openldap-2.4.31-3.fc17
Package openldap-2.4.31-3.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing openldap-2.4.31-3.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-10000/openldap-2.4.31-3.fc17 then log in and leave karma (feedback).
openldap-2.4.31-3.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.