NRPE - Connection reset by Peer

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
shantanu.mondal
Posts: 2
Joined: Thu May 18, 2023 8:20 am

NRPE - Connection reset by Peer

Post by shantanu.mondal »

Hi,

I have a target server ( 10.16.2.45 ) and Nagios Host Server ( 10.16.2.205 ) . When i am trying to add service monitors or host monitor on Nagios , i am getting "Check NRPE : Connection Reset by peer " error msg . I tried couple of solutions from internet like validating nrpe.cfg for "allowed host" entry on target server , disable firewall etc. but getting the same issue .

System details Highlights :

OS (target and Host) : Oracle 8 Linux
Nagios XI version on Host server : 5.9.*
NRPE version on both is v4.1.0

Edit 1 : if i configure nrpe.cfg on target server to allow talking to host server , i get the error " CHECK_NRPE: Receive header underflow - only 0 bytes received (4 expected) " .

Edit 2 : I tried removing nrpe file ( /etc/xinetd.d/nrpe ) from target server and restarting xinetd and nrpe services .Now , i am getting below status for nrpe service on target server.

[root@dennaglab1 xinetd.d]# [root@dennaglab1 xinetd.d]# systemctl status nrpe
● nrpe.service - Nagios Remote Plugin Executor
Loaded: loaded (/usr/lib/systemd/system/nrpe.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2023-05-29 10:51:43 EDT; 2min 12s ago
Docs: http://www.nagios.org/documentation
Process: 13174 ExecStopPost=/bin/rm -f /run/nrpe/nrpe.pid (code=exited, status=0/SUCCESS)
Main PID: 13179 (nrpe)
Tasks: 1 (limit: 48056)
Memory: 736.0K
CGroup: /system.slice/nrpe.service
└─13179 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f
bash: [root@dennaglab1: command not found

May 29 10:51:43 dennaglab1.jeppesen.com nrpe[13179]: Starting up daemon
May 29 10:51:43 dennaglab1.jeppesen.com nrpe[13179]: Server listening on 0.0.0.0 port 5666.
May 29 10:51:43 dennaglab1.jeppesen.com nrpe[13179]: Server listening on :: port 5666.
May 29 10:51:43 dennaglab1.jeppesen.com nrpe[13179]: Listening for connections on port 5666
May 29 10:51:43 dennaglab1.jeppesen.com nrpe[13179]: Allowing connections from: 127.0.0.1,dennagxit3.jeppesen.com,10.16.2.205
May 29 10:52:50 dennaglab1.jeppesen.com nrpe[13189]: Error: (!log_opts) Could not complete SSL handshake with 10.16.2.205: 1
May 29 10:53:09 dennaglab1.jeppesen.com nrpe[13191]: Error: Request contained command arguments, but argument option is not enabled!
May 29 10:53:09 dennaglab1.jeppesen.com nrpe[13191]: Client request from 10.16.2.205 was invalid, bailing out...
May 29 10:53:34 dennaglab1.jeppesen.com nrpe[13193]: Error: Request contained command arguments, but argument option is not enabled!
May 29 10:53:34 dennaglab1.jeppesen.com nrpe[13193]: Client request from 10.16.2.205 was invalid, bailing out...


Please advise on the current situation.

Thanks,
Shantanu
kg2857
Posts: 233
Joined: Wed Apr 12, 2023 5:48 pm

Re: NRPE - Connection reset by Peer

Post by kg2857 »

Looks like the SSL settings don't match and requests have arguments which are not allowed the way nrpe is configured.

May 29 10:52:50 dennaglab1.jeppesen.com nrpe[13189]: Error: (!log_opts) Could not complete SSL handshake with 10.16.2.205: 1
May 29 10:53:09 dennaglab1.jeppesen.com nrpe[13191]: Error: Request contained command arguments, but argument option is not enabled!
shantanu.mondal
Posts: 2
Joined: Thu May 18, 2023 8:20 am

Re: NRPE - Connection reset by Peer

Post by shantanu.mondal »

Thanks ! that's what i figured .
What should be my next course of action .

Edit to last finding : Check_nrpeVersion command is running fine , but for the other commands i am getting buffer underflow error .
Post Reply