SSL Handshake error on Nagios NRPE server

2.3k Views Asked by At

I have nrpe(NRPE v4.0.3) on my centos server. I was using prometheus to monitor nrpe checks. Nrpe-exporter is running as a docker container but I see the below error in nrpe-exporter container logs

level=error ts=2022-05-15T02:45:21.361955654Z caller=nrpe_exporter.go:72 msg="Error running command" command=check_load err="nrpe: error while reading"
level=error ts=2022-05-15T02:45:34.398684293Z caller=nrpe_exporter.go:72 msg="Error running command" command=check_load err="read tcp 192.168.70.50:44606->192.168.70.50:5666: read: connection reset by peer"
level=error ts=2022-05-15T02:45:34.783260075Z caller=nrpe_exporter.go:72 msg="Error running command" command=check_load err="read tcp 127.0.0.1:35428->127.0.0.1:5666: read: connection reset by peer"

So I went into /etc/nagios/nrpe.cfg and checked that I am allowing nagios server ip but when I cehcked the /var/run/nrpe.log, I see this error

[1652582524] Error: (!log_opts) Could not complete SSL handshake with 192.168.70.50: 1
[1652582524] Error: (!log_opts) Could not complete SSL handshake with 127.0.0.1: 1

I dont have /etc/xinetd.d/nrpe file

When I execute the commands directly they are working fine

[root@dev ~]# /usr/lib64/nagios/plugins/check_nrpe -H dev
NRPE v4.0.3
[root@dev ~]# /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
OK - load average: 0.04, 0.07, 0.12|load1=0.040;15.000;30.000;0; load5=0.070;10.000;25.000;0; load15=0.120;5.000;20.000;0;
1

There are 1 best solutions below

2
Ajay On

Figured out the issue.

I made the below change and restarted nrpe service and I was able to see the results

[root@dev ~]# vi /etc/sysconfig/nrpe
NRPE_SSL_OPT="-n"