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

Re: OpenLDAP not starting using "systemctl start" but runs fine invoking slapd directly



On 01-09-17 11:30, Michael.Haertel@t-systems.com wrote:
> Dear List,
> 
>  
> 
> I hope that somebody can help me here.
> 
>  
> 
> My OpenLDAP starts fine using “slapd -d -1 -F /etc/openldap/slapd.d”.
> Everything is OK if I start the service using that command. But if I try
> to use the service “/bin/systemctl start  slapd.service” it fails to start.
> 
>  
> 
> “/bin/systemctl start  slapd.service
> 
> Job for slapd.service failed because the control process exited with
> error code. See "systemctl status slapd.service" and "journalctl -xe"
> for details.”
> 
>  
> 
>  
> 
> The output of “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 Fri 2017-09-01 10:37:55
> CEST; 7s ago/
> 
> /     Docs: man:slapd/
> 
> /           man:slapd-config/
> 
> /           man:slapd-hdb/
> 
> /           man:slapd-mdb/
> 
> /           file:///usr/share/doc/openldap-servers/guide.html/
> 
> /  Process: 45146 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS}
> $SLAPD_OPTIONS (code=exited, status=1/FAILURE)/
> 
> /  Process: 45132 ExecStartPre=/usr/libexec/openldap/check-config.sh
> (code=exited, status=0/SUCCESS)/
> 
> / /
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo systemd[1]: Starting OpenLDAP
> Server Daemon.../
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo runuser[45135]:
> pam_unix(runuser:session): session opened for user ldap by (uid=0)/
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo runuser[45135]:
> pam_unix(runuser:session): session closed for user ldap/
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo slapd[45146]: @(#) $OpenLDAP:
> slapd 2.4.40 (Nov  3 2016 18:02:29) $/
> 
> /                                                           
> mockbuild@x86-ol7-builder-01:/builddir/build/BUILD/openldap-2.4.40/openldap-2.4.40/servers/slapd/
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo systemd[1]: slapd.service:
> control process exited, code=exited status=1/
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo systemd[1]: Failed to start
> OpenLDAP Server Daemon./
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo systemd[1]: Unit slapd.service
> entered failed state./
> 
> /Sep 01 10:37:55 tmv2312.devlab.de.tmo systemd[1]: slapd.service failed./
> 
> / /
> 
> Output of “journalctl -xe”
> 
>  
> 
>  
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo polkitd[772]: Registered
> Authentication Agent for unix-process:51631:336035477 (system bus name
> :1.16850 [/usr/bin/pkttyagent --notify-fd 5 --fall/
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo systemd[1]: Starting OpenLDAP
> Server Daemon.../
> 
> /-- Subject: Unit slapd.service has begun start-up/
> 
> /-- Defined-By: systemd/
> 
> /-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel/
> 
> /--/
> 
> /-- Unit slapd.service has begun starting up./
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo runuser[51640]:
> pam_unix(runuser:session): session opened for user ldap by (uid=0)/
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo runuser[51640]:
> pam_unix(runuser:session): session closed for user ldap/
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo slapd[51651]: @(#) $OpenLDAP:
> slapd 2.4.40 (Nov  3 2016 18:02:29) $/
> 
> /                                                           
> mockbuild@x86-ol7-builder-01:/builddir/build/BUILD/openldap-2.4.40/openldap-2.4.40/servers/slapd/
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo systemd[1]: slapd.service:
> control process exited, code=exited status=1/
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo systemd[1]: Failed to start
> OpenLDAP Server Daemon./
> 
> /-- Subject: Unit slapd.service has failed/
> 
> /-- Defined-By: systemd/
> 
> /-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel/
> 
> /--/
> 
> /-- Unit slapd.service has failed./
> 
> /--/
> 
> /-- The result is failed./
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo systemd[1]: Unit slapd.service
> entered failed state./
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo systemd[1]: slapd.service failed./
> 
> /Sep 01 11:24:06 tmv2312.devlab.de.tmo polkitd[772]: Unregistered
> Authentication Agent for unix-process:51631:336035477 (system bus name
> :1.16850, object path /org/freedesktop/PolicyKit/
> 
> / /
> 
> / /
> 
> I don’t see any message that would help me to understand the reason for
> the failure.
> 
>  
> 
> The content of slapd.service:
> 
>  
> 
> /“[Unit]/
> 
> /Description=OpenLDAP Server Daemon/
> 
> /After=syslog.target network-online.target/
> 
> /Documentation=man:slapd/
> 
> /Documentation=man:slapd-config/
> 
> /Documentation=man:slapd-hdb/
> 
> /Documentation=man:slapd-mdb/
> 
> /Documentation=file:///usr/share/doc/openldap-servers/guide.html/
> 
> / /
> 
> /[Service]/
> 
> /Type=forking/
> 
> /PIDFile=/var/run/openldap/slapd.pid/
> 
> /Environment="SLAPD_URLS=ldap:/// ldapi:///" "SLAPD_OPTIONS="/
> 
> /EnvironmentFile=/etc/sysconfig/slapd/
> 
> /ExecStartPre=/usr/libexec/openldap/check-config.sh/
> 
> /ExecStart=/usr/sbin/slapd -u ldap -h *${SLAPD_URLS} $SLAPD_OPTIONS*/
> 
> / /
> 
> /[Install]/
> 
> /WantedBy=multi-user.target”/
> 
> / /
> 
>  
> 
> Where does the script take “*/${SLAPD_URLS}” /*and */“$SLAPD_OPTIONS”
> /*from?
> 

On my servers ( SLES12 ) it reads from: /etc/sysconfig/openldap. Fairly
self-explaining, but you might want to share it with us.
Best,

gerard



Attachment: signature.asc
Description: OpenPGP digital signature