Page 1 of 4

CHECK_NRPE : Error : Connection Reset by Peer

Posted: Wed Dec 18, 2019 11:54 am
by amitgupta19
I am using the Nagios Core 4.4.3

I have recently added some Linux servers to the monitoring.
They all are giving the Same Error:

"Check_NRPE: Error - Could not connect to xxx.xxx.xxx.xxx: Connection reset by peer"

I have checked the server nrpe.cfg file and Nagios Server IP is allowed there.

Also Server Firewall is allowing the connection by the Nagios Server as well.

Kindly suggest.

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Wed Dec 18, 2019 5:28 pm
by mbellerue
Can you post your check command, and the nrpe.cfg file from one of the servers?

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Thu Dec 19, 2019 11:17 am
by amitgupta19
Please find here with the command:

define command {

command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}

and nrpe.cfg is attached herewith. before uploading the file I have changed the Nagios Server IP to xxx.xxx.xxx.xxx

Kindly suggest

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Thu Dec 19, 2019 1:24 pm
by mbellerue
That all looks correct. In your nrpe.cfg file, you should set debug=0 to debug=1, try to connect, and then see if there are any errors in the log file. Try that and let me know what happens.

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Fri Dec 20, 2019 9:10 am
by amitgupta19
Please find attached the log file.
i have replaced the nagios server ip with the xxx.xxx.xxx.xxx

Kindly look into it.

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Fri Dec 20, 2019 4:16 pm
by mbellerue
It looks like there's a ton of SSL handshake errors. Can you try adding --no-ssl to your check command, and see if it connects?

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Mon Dec 23, 2019 4:21 am
by amitgupta19
I don't want to change the command, because the same command is working for the other servers.

So kindly suggest, is it really required to change the command and i don't want to break the monitoring for other servers.

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Mon Dec 23, 2019 12:29 pm
by mbellerue
If the current command is working for a number of other servers, then you can put the -n switch in the $ARG1$ for the servers where it is not working. Or create a copy of the existing command, and add the -n to the copy, then apply the copy to each of the servers that require the -n. Would either of those options work for you?

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Tue Dec 24, 2019 5:32 am
by amitgupta19
Does this mean that there is something in the Server which is giving the SSL Error?
if yes, What could be the reason?

Because we already have the servers working without any error.

Re: CHECK_NRPE : Error : Connection Reset by Peer

Posted: Tue Dec 24, 2019 8:09 am
by amitgupta19
Also i have checked by changing the Command for One Service Check Disk All, Now the Error is Changed:

CHECK_NRPE: Receive header underflow - only -1 bytes received (4 expected).

Kindly Suggest