Symas OpenLDAP Knowledge Base

Core File Retention

SystemD-Based Operating Systems

Set System Core File Size Limit

Warning: RedHat/CentOS 7+, Ubuntu 16+, Debian 8+, SLES 12+ all use systemd which ignores /etc/security/limits.conf and /etc/security/limits.d/* settings. To permit core files without size limits on systemd-based systems use the following process instead.

NOTE: these steps must be done as root:

    sudo -s
    cd /etc/systemd/system
    mkdir solserver.service.d
    cd solserver.service.d
    printf "[Service]nLimitCORE=infinityn" > override.conf
    systemctl daemon-reload

Now you can verify the change has taken effect for future slapd startup:

    systemctl cat solserver

This should show the updated limits:

    # /etc/systemd/system/solserver.service.d/override.conf
    [Service]
    LimitCORE=infinity

Once Symas OpenLDAP is installed you can view the process’s limits file

to see the Max open files limit:

    systemctl show solserver | grep LimitCORE
    LimitCORE=infinity
    LimitCORESoft=infinity

If adjusting these settings after Symas OpenLDAP is installed and slapd

is running, a restart of solserver is required to pick up the change.

    systemctl restart solserver

Generating Usable Core Dumps in Debian/Ubuntu

Unfortunately, generating usable core files on Debian or Ubuntu

Operating Systems requires disabling the apport process. To do this, edit /etc/default/apport, and set enabled to 0.

    sudo vi /etc/default/apport
    enabled=0

Then stop the apport service and apply the following core file defaults:

    sudo service apport stop
    sudo vi /etc/sysctl.d/60-slapd-core.conf 
    kernel.core_uses_pid=1
    fs.suid_dumpable=2
    kernel.core_pattern=/opt/symas/data/tmp/core-%e-%s-%u-%g-%p-%t 

Then start the procps service.

    sudo service procps start

Set Default Save-To Location for Core Files

Add the following to /etc/systemd/coredump.conf:

    sudo vi /etc/systemd/coredump.conf
    [Coredump]
    Storage=both
    Compress=yes
    cd /etc/systctl.d/
    sudo ln -s /etc/systemd/coredump.conf 50-coredump.conf 

For some systems, /etc/sysctl.d/99-sysctl.conf will be a simlink to /etc/sysctl.conf. On others is will its own file. Whichever is the case, edit the file with the following:

    sudo vi /etc/sysctl.conf
    OR
    sudo vi /etc/sysctl.d/99-sysctl.conf 
    fs.suid_dumpable = 2
    kernel.core_uses_pid = 1
    kernel.core_pattern = /tmp/core-%e-%s-%u-%g-%p-%t 
    Or
    kernel.core_pattern = /opt/tmp/core-%e-%s-%u-%g-%p-%t