On trying to setup some older HP-UX systems with the 3.x version of Nagios NRPE plugin I saw:
Quote:
Unable to open config file '//nrpe.cfg' for reading
|
This was attempted using inetd (on HP-UX as opposed to xinetd on Linux where it works fine). It had also worked fine on HP-UX running it as a daemon (-d option) as opposed to inet (-i option).
The incorrect entry initially added to /etc/inetd.conf on HP-UX was:
Code:
nrpe stream tcp nowait nagios /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -i
After doing some checking I saw many had this issue but never saw an actual resolution to it. After reviewing the entry against others and the man page my error became apparent. The correct line should be:
Code:
nrpe stream tcp nowait nagios /usr/local/nagios/bin/nrpe nrpe -c /usr/local/nagios/etc/nrpe.cfg -i
The man page says in part:
Quote:
server program arguments
Arguments to the server program. The same as in normal use, starting with argv[0], which is the name of the program.
|
In my mind I was thinking "the arugments" to the command rather than "the command AND its arguments" because the full path to command already existed on the line. However it requires the command AND arugments to exist staring as argv[0] in ADDITION to the full path entry before that.
This is being posted as I saw similar issues mentioning inetd.conf on Solaris, FreeBSD, AIX and other so hopefully someone else will find it useful. (Also newer as many of those posts were rather old.) Many of them also go down the wrong road trying to solve the socket error message seen on the Nagios master rather than the above error which is in the system log of the nrpe client server.