nrpe ERROR: write_pid_file() write(fd, pbuf) failed...

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Hui
Posts: 4
Joined: Wed Sep 20, 2017 9:36 pm

nrpe ERROR: write_pid_file() write(fd, pbuf) failed...

Post by Hui »

Hello,
I installed nrpe-3.2.1 on my lab. When I run "systemctl start nrpe", I encounter an error as follows.
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2017-10-10 13:52:25 CST; 14s ago
Docs: http://www.nagios.org/documentation
Main PID: 6759 (nrpe)
CGroup: /system.slice/nrpe.service
└─6759 /usr/sbin/nrpe -c /etc/nrpe/nrpe.cfg -f

Oct 10 13:52:25 brdbjiantao-oame-0 systemd[1]: Started Nagios Remote Plugin Executor.
Oct 10 13:52:25 brdbjiantao-oame-0 systemd[1]: Starting Nagios Remote Plugin Executor...
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: Starting up daemon
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: ERROR: write_pid_file() write(fd, pbuf) failed...
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: Server listening on 0.0.0.0 port 5666.
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: Server listening on :: port 5666.
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: Listening for connections on port 5666
Oct 10 13:52:25 brdbjiantao-oame-0 nrpe[6759]: Allowing connections from: 127.0.0.1

I checked the directory /var/log/nagios/ and found the permission of both directory and file are correct.
The file nrpe.pid has been created but no PID is written to the file.

[root@brdbjiantao-oame-0 ~]# ls -la /var/log/nagios/
total 12
drwxr-xr-x. 3 nagios nagios 4096 Oct 10 13:52 .
drwxr-xr-x. 20 root root 4096 Oct 10 10:58 ..
drwxr-xr-x. 2 nagios nagios 4096 Oct 10 00:00 archives
-rw-r--r--. 1 nagios nagios 0 Oct 10 15:13 nagios.log
-rw-r--r--. 1 nagios nagios 0 Oct 10 13:52 nrpe.pid

I wonder how to fix this issue. Looking forward to your reply.

Thanks and best regards,
Hui
bolson

Re: nrpe ERROR: write_pid_file() write(fd, pbuf) failed...

Post by bolson »

Hello Hui,

Which operating system? And is there a reason why you're running NRPE as a daemon rather than a xinetd service? Does nrpe seem to be working? Run the following from the CLI of the nrpe host:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
And post the result.
Locked