NRPE

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.
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

NRPE

Post by spiderpig82 »

hi,

i installed nrpe plugin on a centos server, configure the nrpe.cfg.
but after that i have to restart the nrpe service, but it always fails to restart. It wont stop.
(i can not restart the server, so that is not in the picture)

any ideas?

thanx
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE

Post by tmcdonald »

What error messages are you getting when trying to restart the service? What command are you using to restart it? Can you show us the result of running the command and the output that follows?
Former Nagios employee
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

Re: NRPE

Post by spiderpig82 »

hi,

i have tried "root: /etc/init.d/nrpe restart" and "service nrpe restart"
shuttind down nrpe: [FAILED]
Starting nrpe: [OK]

in /var/log/message i get these messages on the linux client that i'm trying to enable the nrpe (172.16.250.60 is the nagios server)
xinetd[1538]: START: nrpe pid=4229 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4229 duration=0(sec)
xinetd[1538]: START: nrpe pid=4231 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4232 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4231 duration=0(sec)
xinetd[1538]: START: nrpe pid=4233 from=::ffff:172.16.250.60
nrpe[4232]: Error: Request contained command arguments!
nrpe[4232]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4232 duration=0(sec)
nrpe[4233]: Error: Request contained command arguments!
nrpe[4233]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4233 duration=0(sec)
xinetd[1538]: START: nrpe pid=4234 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4235 from=::ffff:172.16.250.60
xinetd[1538]: START: nrpe pid=4236 from=::ffff:172.16.250.60
xinetd[1538]: EXIT: nrpe status=0 pid=4234 duration=0(sec)
xinetd[1538]: EXIT: nrpe status=0 pid=4235 duration=0(sec)
xinetd[1538]: EXIT: nrpe status=0 pid=4236 duration=0(sec)
xinetd[1538]: START: nrpe pid=4240 from=::ffff:172.16.250.60
nrpe[4240]: Error: Request contained command arguments!
nrpe[4240]: Client request was invalid, bailing out...
xinetd[1538]: EXIT: nrpe status=0 pid=4240 duration=0(sec)
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE

Post by lmiltchev »

Run the following commands and show us the output:

Code: Select all

ps axuw | grep nrpe
netstat -at | grep nrpe
ls -la /etc/init.d/nrpe
For the "nrpe[4232]: Error: Request contained command arguments!" error, change the following line in the nrpe.cfg from this:

Code: Select all

dont_blame_nrpe=0
to this:

Code: Select all

dont_blame_nrpe=1
You still need to restart nrpe so that changes can take effect.
Be sure to check out our Knowledgebase for helpful articles and solutions!
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

Re: NRPE

Post by spiderpig82 »

hi,

here's the info:
ps axuw | grep nrpe
root 12325 0.0 0.0 103252 844 pts/0 S+ 15:01 0:00 grep nrpe

netstat -at | grep nrpe
tcp 0 0 *:nrpe *:* LISTEN

ls -la /etc/init.d/nrpe
-rwxr-xr-x 1 root root 1583 May 1 01:28 /etc/init.d/nrpe
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE

Post by lmiltchev »

Can you restart nrpe by running the following command?

Code: Select all

service xinetd restart
Did you set "dont_blame_nrpe=1" in the nrpe.cfg?
Be sure to check out our Knowledgebase for helpful articles and solutions!
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

Re: NRPE

Post by spiderpig82 »

yes i can restart xienetd service , and set the dont_blame_nrpe=1

[root@linux etc]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@linux etc]# service nrpe restart
Shutting down nrpe: [FAILED]
Starting nrpe: [ OK ]
[root@linux etc]#
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE

Post by slansing »

How did you install NRPE? Compiling from source, or our linux-agent tarball? The reason I ask is you have an actual NRPE service, which means you are likely not using xinetd to control it. Do you have an NRPE file under:

Code: Select all

/etc/xinetd.d/nrpe
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

Re: NRPE

Post by spiderpig82 »

yes i did install the nrpe, via tarball if i remember right.
was it wrong move to install the nrpe? can i just use the xienetd service?

(here is the nrpe file in /etc/xinetd.d/nrpe )
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 127.0.0.1 (and nagios servers ip)
}
spiderpig82
Posts: 22
Joined: Wed Aug 27, 2014 7:29 am

Re: NRPE

Post by spiderpig82 »

should i remove the nrpe service?
Locked