CHECK_NRPE : Error : Connection Reset by Peer

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.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

CHECK_NRPE : Error : Connection Reset by Peer

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post by mbellerue »

Can you post your check command, and the nrpe.cfg file from one of the servers?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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
Attachments
nrpe.cfg.cfg
nrpe.cfg file
(13.14 KiB) Downloaded 1035 times
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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.
Attachments
nrpe-debug.log
Log File
(147.38 KiB) Downloaded 755 times
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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.
amitgupta19
Posts: 286
Joined: Fri Sep 08, 2017 5:53 am

Re: CHECK_NRPE : Error : Connection Reset by Peer

Post 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
Locked