Problem: nrpe Does Not Start


The nrpe daemon (for Nagios) does not start at all or does not start at system boot.


UCS 4.2 or newer with systemd.


Check file permissions for /etc/nagios and /var/run/nagios and set them accordingly.

systemctl stop nagios-nrpe-server.service
chown -R root:root /etc/nagios
chown root:nogroup /etc/nagios/nrpe.univention.d
find /etc/nagios -type d -exec chmod 0755 {} \;
find /etc/nagios -type f -exec chmod 0655 {} \;
rm -rf /run/nagios
systemd-tmpfiles --create
echo "systemd-tmpfiles --create">>/etc/rc.local
systemctl stop nagios-nrpe-server.service

Note Instead of using rc.local you should make sure your user called “nagios” is a local user (see below).

Root Cause

For the files and directories under /etc the permissions have changed due to an unknown reason.

For /var/run the root cause is a domain user named “nagios”. At system boot the systemd-tmpfiles could not get the user-id for a user named “nagios” as at this early stage a connection the the LDAP server was not yet possible. So tmp-file creation failed. Once booted the system can easily get the user’s id.