Page 1 of 1

nrpe issue

Posted: Fri Aug 03, 2012 1:43 am
by leonxjm
I am new in nagios, after the installation, my nagios shows
CHECK_NRPE: Error receiving data from daemon && CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Only ping works. I tried to find out the error log,

xinetd[9307]: FAIL: nrpe address from=218.5.81.133
host03 xinetd[3382]: START: nrpe pid=9307 from=218.5.81.133
xinetd[3382]: EXIT: nrpe status=0 pid=9307 duration=0(sec)

I tried to kill and restart nrpe on remote server, after the command: /usr/local/nagios/bin/nrpe -n -c /usr/local/nagios/etc/nrpe.cfg -d

This messages showed:

nrpe[7734]: Starting up daemon
nrpe[7734]: Network server bind failure (98: Address already in use)


Any ideas?

Re: nrpe issue

Posted: Fri Aug 03, 2012 9:38 am
by nscott
This line:

Code: Select all

xinetd[9307]: FAIL: nrpe address from=218.5.81.133
Leads me to believe that you need to add 218.5.81.133 to your allowed hosts (provided that your Nagios server is at 218.5.81.133). Depending on your distribution, the xinetd config could be in several places. If you're on a RHEL based system, its probably at /etc/xinetd.d/nrpe, if you could post your xinetd config for nrpe, I could help you a bit more.

Re: nrpe issue

Posted: Mon Aug 06, 2012 12:22 am
by leonxjm
Hi, thank you very much for your help. This is my xinet.d configure code

Code: Select all

# 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
}

Re: nrpe issue

Posted: Mon Aug 06, 2012 12:24 am
by leonxjm
Hi, thank you very much for your help, please check the code, my OS is Centos 5.4

# 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
}

Re: nrpe issue

Posted: Mon Aug 06, 2012 1:52 am
by leonxjm
When I configured the monitor via SSH, I got Remote command execution failed: stdin: is not a tty

I have no idea why this error happen