Description of problem: nrpe daemon does not start automatically on boot. Version-Release number of selected component (if applicable): nrpe-3.1.1-1.el7.x86_64 How reproducible: every time Steps to Reproduce: 1. configure and enable nrpe 2. reboot 3. Actual results: nrpe is NOT running after reboot Expected results: nrpe is running after reboot Additional info: nrpe tries to start before the network is up [root@trgen1 ~]# systemctl status nrpe ● nrpe.service - Nagios Remote Program Executor Loaded: loaded (/usr/lib/systemd/system/nrpe.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Fri 2017-08-25 13:00:21 UTC; 1min 21s ago Docs: http://www.nagios.org/documentation Process: 480 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d $NRPE_SSL_OPT (code=exited, status=0/SUCCESS) Main PID: 506 (code=exited, status=1/FAILURE) Aug 25 13:00:21 trgen1 systemd[1]: Starting Nagios Remote Program Executor... Aug 25 13:00:21 trgen1 nrpe[506]: Starting up daemon Aug 25 13:00:21 trgen1 nrpe[506]: Bind to port 5666 on 10.111.113.21 failed: Cannot assign requested address. Aug 25 13:00:21 trgen1 systemd[1]: Started Nagios Remote Program Executor. Aug 25 13:00:21 trgen1 systemd[1]: nrpe.service: main process exited, code=exited, status=1/FAILURE Aug 25 13:00:21 trgen1 systemd[1]: Unit nrpe.service entered failed state. Aug 25 13:00:21 trgen1 systemd[1]: nrpe.service failed. To fix it add "After=network.target" in the unit file. The "Requires=network.target" statement is not enough as this does not influence the order in which units are started. Citing https://www.freedesktop.org/software/systemd/man/systemd.unit.html: Requires= Configures requirement dependencies on other units. If this unit gets activated, the units listed here will be activated as well. If one of the other units gets deactivated or its activation fails, this unit will be deactivated. This option may be specified more than once or multiple space-separated units may be specified in one option in which case requirement dependencies for all listed names will be created. Note that requirement dependencies do not influence the order in which services are started or stopped. This has to be configured independently with the After= or Before= options. If a unit foo.service requires a unit bar.service as configured with Requires= and no ordering is configured with After= or Before=, then both units will be started simultaneously and without any delay between them if foo.service is activated. Often, it is a better choice to use Wants= instead of Requires= in order to achieve a system that is more robust when dealing with failing services. -- BRS Atanas Zhelev
Can confirm the fix/workaround of changing Requires= to After= in the service definition.
als encountering this problem and can confirm Timothy's workaround
Created attachment 1348653 [details] new nrpe.service file I only added the After=network.target line on #5
nrpe-3.2.1-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-7d3573f0dd
nrpe-3.2.1-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-fc61945c6e
nrpe-3.2.1-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a0dbaac6c4
nrpe-3.2.1-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3814ee7c37
nrpe-3.2.1-1.fc25 has been pushed to the Fedora 25 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-2017-c3d78c0cc5
nrpe-3.2.1-1.fc27 has been pushed to the Fedora 27 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-2017-3814ee7c37
nrpe-3.2.1-1.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-2017-7d3573f0dd
nrpe-3.2.1-1.fc26 has been pushed to the Fedora 26 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-2017-a0dbaac6c4
nrpe-3.2.1-1.el6 has been pushed to the Fedora EPEL 6 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-2017-fc61945c6e
nrpe-3.2.1-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
nrpe-3.2.1-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-957b082df2
nrpe-3.2.1-6.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-b3550341aa
nrpe-3.2.1-6.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-957b082df2
nrpe-3.2.1-6.el6 has been pushed to the Fedora EPEL 6 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-b3550341aa
nrpe-3.2.1-6.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
nrpe-3.2.1-6.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.