Description of problem: nrpe does not start on RHEL 7.5 Version-Release number of selected component (if applicable): nrpe-3.2.1-6.el7.x86_64 How reproducible: [localhost] [09:30:08 PM] [root@localhost ~]# rpm -q nrpe nrpe-3.2.0-6.el7.x86_64 [localhost] [09:30:23 PM] [root@localhost ~]# systemctl start nrpe [localhost] [09:30:28 PM] [root@localhost ~]# systemctl status nrpe ● nrpe.service - Nagios Remote Program Executor Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2018-10-09 21:30:28 UTC; 5s ago Docs: http://www.nagios.org/documentation Process: 13629 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT (code=exited, status=0/SUCCESS) Main PID: 13630 (nrpe) CGroup: /system.slice/nrpe.service └─13630 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d Oct 09 21:30:28 localhost systemd[1]: Starting Nagios Remote Program Executor... Oct 09 21:30:28 localhost nrpe[13630]: Starting up daemon Oct 09 21:30:28 localhost nrpe[13630]: Server listening on 0.0.0.0 port 5666. Oct 09 21:30:28 localhost nrpe[13630]: Server listening on :: port 5666. Oct 09 21:30:28 localhost nrpe[13630]: Listening for connections on port 5666 Oct 09 21:30:28 localhost systemd[1]: Started Nagios Remote Program Executor. [localhost] [09:30:34 PM] [root@localhost ~]# systemctl stop nrpe [localhost] [09:30:38 PM] [root@localhost ~]# yum update nrpe -y Loaded plugins: product-id, rhnplugin, search-disabled-repos, subscription-manager, versionlock This system is receiving updates from RHN Classic or Red Hat Satellite. el7-x86_64-itops | 2.9 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package nrpe.x86_64 0:3.2.0-6.el7 will be updated ---> Package nrpe.x86_64 0:3.2.1-6.el7 will be an update --> Finished Dependency Resolution Dependencies Resolved ===================================================================================================================================================================================================================== Package Arch Version Repository Size ===================================================================================================================================================================================================================== Updating: nrpe x86_64 3.2.1-6.el7 epel-7-server-x86_64 261 k Transaction Summary ===================================================================================================================================================================================================================== Upgrade 1 Package Total download size: 261 k Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. nrpe-3.2.1-6.el7.x86_64.rpm | 261 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : nrpe-3.2.1-6.el7.x86_64 1/2 Cleanup : nrpe-3.2.0-6.el7.x86_64 2/2 Verifying : nrpe-3.2.1-6.el7.x86_64 1/2 Verifying : nrpe-3.2.0-6.el7.x86_64 2/2 Updated: nrpe.x86_64 0:3.2.1-6.el7 Complete! [localhost] [09:31:00 PM] [root@localhost ~]# systemctl start nrpe Job for nrpe.service failed because a timeout was exceeded. See "systemctl status nrpe.service" and "journalctl -xe" for details. [localhost] [09:32:44 PM] [root@localhost ~]# systemctl status nrpe ● nrpe.service - Nagios Remote Program Executor Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled) Active: failed (Result: timeout) since Tue 2018-10-09 21:32:44 UTC; 31s ago Docs: http://www.nagios.org/documentation Process: 14253 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT (code=exited, status=0/SUCCESS) Main PID: 13630 (code=exited, status=0/SUCCESS) Oct 09 21:31:13 localhost systemd[1]: Starting Nagios Remote Program Executor... Oct 09 21:31:13 localhost nrpe[14254]: Starting up daemon Oct 09 21:31:13 localhost nrpe[14254]: Server listening on 0.0.0.0 port 5666. Oct 09 21:31:13 localhost nrpe[14254]: Server listening on :: port 5666. Oct 09 21:31:13 localhost nrpe[14254]: Listening for connections on port 5666 Oct 09 21:31:13 localhost systemd[1]: PID file /var/run/nrpe/nrpe.pid not readable (yet?) after start. Oct 09 21:32:44 localhost systemd[1]: nrpe.service start operation timed out. Terminating. Oct 09 21:32:44 localhost systemd[1]: Failed to start Nagios Remote Program Executor. Oct 09 21:32:44 localhost systemd[1]: Unit nrpe.service entered failed state. Oct 09 21:32:44 localhost systemd[1]: nrpe.service failed. Actual results: Expected results: Additional info:
Do you have the nrpe-selinux rpm installed? If you do please do an audit2allow and see what might be stopping.
I tried to install "nrpe-selinux" and the problem persists (nothing was logged to audit.log).
Problem is one that should have been caught earlier and the package never been pushed to stable. This is on me. The /etc/nagios/nrpe.cfg does not define the pid_file. It is left undefined and also points to the wrong place of /var/run/nrpe.pid The systemd startup however needs the pid_file so that it can properly restart (and fix some other outstanding bugs). It wants it to be in /var/run/nrpe/nrpe.pid The fix will be define the correct entry in /etc/nagios/nrpe.cfg and restart nrpe. I will work on a fixed package and get it out as soon as possible.
Stephen, this is causing headaches for my team and I, can you push the fix?
The problem is trying to figure out why the fix was not included in the build as given. The configure script has a --with-pidfile assigned to the correct directory and it seems to do the right thing when I do a rpmbuild it was set up correctly without me doing any changes to the existing src.rpm pid_file=/var/run/nrpe/nrpe.pid However what came out of the build system does not have this. I am working through what could have caused this and hope to have a fixed package. It will however not fix any systems which have an edited /etc/nagios/nrpe.cfg Those will have a rpmnew and the old config won't have it.
Please check to see if there is a /etc/nagios/nrpe.cfg.rpmnew in the systems. The boxes I found not working had an rpmnew from 2017 where the pid_file had been defined for the correct place. The change which seems to have broken was trying to fix another issue 096a4983 nrpe.service.epel (Stephen Smoogen 2018-07-24 17:01:19 -0400 18) ExecReload=/bin/kill -HUP $MAINPID 096a4983 nrpe.service.epel (Stephen Smoogen 2018-07-24 17:01:19 -0400 19) ExecStopPost=/bin/rm -f /var/run/nrpe/nrpe.pid 096a4983 nrpe.service.epel (Stephen Smoogen 2018-07-24 17:01:19 -0400 20) PIDFile=/var/run/nrpe/nrpe.pid
nrpe-3.2.1-8.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7f7330f37a
*** Bug 1639819 has been marked as a duplicate of this bug. ***
nrpe-3.2.1-8.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-7f7330f37a
nrpe-3.2.1-8.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.