nrpe service cannot start
Posted: Tue Sep 26, 2017 9:19 pm
Hello,
When I start nrpe (3.2.1) service on Linux redhat 7.2 vlab, I encounter an error as follows.
[root@brdbjiantao-db-0 ~]# systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-09-26 16:10:47 CST; 17h ago
Docs: http://www.nagios.org/documentation
Process: 18279 ExecStopPost=/bin/rm -f /var/log/nagios/nrpe.pid (code=exited, status=1/FAILURE)
Process: 18276 ExecStart=/usr/sbin/nrpe -c /etc/nrpe/nrpe.cfg -f (code=exited, status=2)
Main PID: 18276 (code=exited, status=2)
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Started Nagios Remote Plugin Executor.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Starting Nagios Remote Plugin Executor...
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Warning: Cannot open log file '/var/log/nagios/nrpe.log' for writing
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Starting up daemon
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Cannot write to pidfile '/var/log/nagios/nrpe.pid' - check your privileges.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 26 16:10:47 brdbjiantao-db-0 rm[18279]: /bin/rm: cannot remove ‘/var/log/nagios/nrpe.pid’: Permission denied
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service: control process exited, code=exited status=1
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Unit nrpe.service entered failed state.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service failed.
Nagios has no privileges to make the directory /var/log/nagios or touch /var/log/nagios/nrpe.pid. How to fix this issue?
Looking forward to your reply.
Thanks a lot.
Hui
When I start nrpe (3.2.1) service on Linux redhat 7.2 vlab, I encounter an error as follows.
[root@brdbjiantao-db-0 ~]# systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-09-26 16:10:47 CST; 17h ago
Docs: http://www.nagios.org/documentation
Process: 18279 ExecStopPost=/bin/rm -f /var/log/nagios/nrpe.pid (code=exited, status=1/FAILURE)
Process: 18276 ExecStart=/usr/sbin/nrpe -c /etc/nrpe/nrpe.cfg -f (code=exited, status=2)
Main PID: 18276 (code=exited, status=2)
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Started Nagios Remote Plugin Executor.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Starting Nagios Remote Plugin Executor...
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Warning: Cannot open log file '/var/log/nagios/nrpe.log' for writing
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Starting up daemon
Sep 26 16:10:47 brdbjiantao-db-0 nrpe[18276]: Cannot write to pidfile '/var/log/nagios/nrpe.pid' - check your privileges.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Sep 26 16:10:47 brdbjiantao-db-0 rm[18279]: /bin/rm: cannot remove ‘/var/log/nagios/nrpe.pid’: Permission denied
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service: control process exited, code=exited status=1
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: Unit nrpe.service entered failed state.
Sep 26 16:10:47 brdbjiantao-db-0 systemd[1]: nrpe.service failed.
Nagios has no privileges to make the directory /var/log/nagios or touch /var/log/nagios/nrpe.pid. How to fix this issue?
Looking forward to your reply.
Thanks a lot.
Hui