Failed to start OpenLDAP Server Daemon

Latest response

Hi,
I do this work

yum install openldap* migrationtools* -y

Successfully install this

But when I start

systemctl start slapd

I see the error
systemctl start slapd
Job for slapd.service failed because the control process exited with error code. See "systemctl status slapd.service" and "journalctl -xe" for details.

systemctl status slapd.service

● slapd.service - OpenLDAP Server Daemon
Loaded: loaded (/usr/lib/systemd/system/slapd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2019-09-30 23:51:33 +06; 25s ago
Docs: man:slapd
man:slapd-config
man:slapd-hdb
man:slapd-mdb
file:///usr/share/doc/openldap-servers/guide.html
Process: 21644 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS (code=exited, status=1/FAILURE)
Process: 21614 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=exited, status=0/SUCCESS)

How can I solve this problem
Thanks

Responses

Hi Ashraful,

From your short explanation, the following can be concluded:

a) ExecStartPre script completed successfully (error code 0).

b) ExecStrat failed (error code 1).

Options:

a) Did you check the OpenLDAP logs?

b) Could you try to run this manually (replace variables SLAPD_URLS and SLAPD_OPTIONS with their real values):

/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS

c) What is the outcome of:

journalctl -xe

d) Are you using SELinux?

Regards,

Dusan Baljevic (amateur radio VK2COT)

Hi, I have the same issue, for example when I install it , I get the following error

#systemctl status slapd.service
● slapd.service - OpenLDAP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/slapd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-11-13 03:37:09 CST; 7min ago
     Docs: man:slapd
           man:slapd-config
           man:slapd-hdb
           man:slapd-mdb
           file:///usr/share/doc/openldap-servers/guide.html
  Process: 104932 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS (code=exited, status=1/FAILURE)
  Process: 104900 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=exited, status=0/SUCCESS)

Nov 13 03:37:09 ServerG runuser[104925]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG runuser[104927]: pam_unix(runuser:session): session o...)
Nov 13 03:37:09 ServerG runuser[104927]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG runuser[104929]: pam_unix(runuser:session): session o...)
Nov 13 03:37:09 ServerG runuser[104929]: pam_unix(runuser:session): session c...p
Nov 13 03:37:09 ServerG slapd[104932]: @(#) $OpenLDAP: slapd 2.4.44 (Dec 18 ... $
                                                                   mockbuild@x86-017.build.eng.b...pd
Nov 13 03:37:09 ServerG systemd[1]: slapd.service: control process exited, c...=1
Nov 13 03:37:09 ServerG systemd[1]: Failed to start OpenLDAP Server Daemon.
Nov 13 03:37:09 ServerG systemd[1]: Unit slapd.service entered failed state.
Nov 13 03:37:09 ServerG systemd[1]: slapd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

I have searched a lot and tried 100 things, none helped
when I try to run it manually I get the following error at the very end. do you think it says that I dont have SSL configured?

TLSMC: MozNSS compatibility interception ends.
TLS: could not use certificate `OpenLDAP Server'.
TLS: error:0200100D:system library:fopen:Permission denied bss_file.c:402
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:404
TLS: error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib ssl_rsa.c:468
5dcbcf86 main: TLS init def ctx failed: -1
5dcbcf86 slapd destroy: freeing system resources.
5dcbcf86 slapd stopped.
5dcbcf86 connections_destroy: nothing to destroy.