Page 3 of 3

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 8:09 am
by siriideepak
Any update on this, still nrpe service is not running properly.

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 9:35 am
by bolson
Hello siriideepak,

Did you comment out the only_from directive in /etc/xinetd.d/nrpe? It should look like this:

Code: Select all

# only_from etc, etc.

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 11:10 am
by siriideepak
Hi,

I have updated as below, however it didnt worked out. please look into this.


# 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,172.16.3.14
}
~
~
~

root@ip-172-16-1-108:~# tail -f syslog
tail: cannot open 'syslog' for reading: No such file or directory
tail: no files remaining
root@ip-172-16-1-108:~# tail -f /var/log/syslog
Aug 3 16:06:16 localhost xinetd[4159]: Server /usr/local/nagios/bin/nsca is not executable [file=/etc/xinetd.d/nsca] [line=10]
Aug 3 16:06:16 localhost xinetd[4159]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/nsca] [line=10]
Aug 3 16:06:16 localhost xinetd[4159]: removing nrpe
Aug 3 16:06:16 localhost xinetd[4159]: Must specify a server in nsca
Aug 3 16:06:16 localhost xinetd[4159]: xinetd Version 2.3.15 started with libwrap loadavg options compiled in.
Aug 3 16:06:16 localhost xinetd[4159]: Started working: 0 available services
Aug 3 16:07:11 localhost dhclient[890]: DHCPREQUEST of 172.16.1.108 on ens3 to 172.16.1.1 port 67 (xid=0x4488c95f)
Aug 3 16:07:11 localhost dhclient[890]: DHCPACK of 172.16.1.108 from 172.16.1.1
Aug 3 16:07:11 localhost root: /etc/dhcp/dhclient-enter-hooks.d/samba returned non-zero exit status 1
Aug 3 16:07:11 localhost dhclient[890]: bound to 172.16.1.108 -- renewal in 1615 seconds.
Aug 3 16:09:01 localhost CRON[4198]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
^C

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 11:31 am
by bolson
Hello,

One issue that stands out is that the hosts listed in the only_from directive should be separated by a space rather than a comma:

This:only_from = 127.0.0.1 172.16.3.14

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 11:35 am
by bolson
Hello,

One issue that stands out is that the hosts listed in the only_from directive should be separated by a space rather than a comma:

Code: Select all

This:       only_from = 127.0.0.1 172.16.3.14
Not this:   only_from = 127.0.0.1,172.16.3.14
But for now, as I said earlier, comment out the line like this:

Code: Select all

# only_from = 127.0.0.1 172.16.3.14
Then restart nrpe and run your check_nrpe command.

Code: Select all

/usr/local/libexec/check_nrpe -H 127.0.0.1

Re: NRPE Installation Error(make all)

Posted: Thu Aug 03, 2017 7:51 pm
by siriideepak
Hi Bolson,

As per your instruction i have commented only from and the below command. copied the output for your ref. Thanks!!

root@ip-172-16-1-108:~# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
CHECK_NRPE: Error - Could not complete SSL handshake.


root@ip-172-16-1-108:~# tail -f /var/log/syslog
Aug 4 00:48:24 localhost xinetd[6574]: Reading included configuration file: /etc/xinetd.d/nsca [file=/etc/xinetd.d/nsca] [line=16]
Aug 4 00:48:24 localhost xinetd[6574]: Server /usr/local/nagios/bin/nsca is not executable [file=/etc/xinetd.d/nsca] [line=10]
Aug 4 00:48:24 localhost xinetd[6574]: Error parsing attribute server - DISABLING SERVICE [file=/etc/xinetd.d/nsca] [line=10]
Aug 4 00:48:24 localhost xinetd[6574]: Must specify a server in nsca
Aug 4 00:48:24 localhost xinetd[6574]: xinetd Version 2.3.15 started with libwrap loadavg options compiled in.
Aug 4 00:48:24 localhost xinetd[6574]: Started working: 1 available service
Aug 4 00:48:34 localhost nrpe[6576]: Error: Could not complete SSL handshake. 1
Aug 4 00:48:58 localhost nrpe[6578]: Error: Could not complete SSL handshake. 5
Aug 4 00:49:06 localhost nrpe[6579]: Error: Could not complete SSL handshake. 1
Aug 4 00:49:17 localhost nrpe[6582]: Error: Could not complete SSL handshake. 1

Regards,
Deepak.P

Re: NRPE Installation Error(make all)

Posted: Fri Aug 04, 2017 12:41 pm
by bolson
Most likely this is as SSL issue rather than an issue with NRPE.

Please execute the following commands:

Code: Select all

openssl version
netstat -at | grep nrpe
telnet 127.0.0.1 5666
And post your results

Re: NRPE Installation Error(make all)

Posted: Fri Aug 04, 2017 12:42 pm
by bolson
Also:

Code: Select all

telnet localhost 5666