Re: [Nagios-devel] Small patch for check_nrpe.c

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.
Locked
Guest

Re: [Nagios-devel] Small patch for check_nrpe.c

Post by Guest »

Mark Plaksin wrote:
> Here's a small patch which makes check_nrpe close the socket gracefully
> when it's done. This resolved a problem we were having with spurious
> timeouts. We've been running it on our production Nagios instance (200
> hosts, 5000 services; most services use NRPE) for a week and it's working
> great.
>
> Before the patch, check_nrpe_ssl was timing out when trying to connect to
> hosts that were definitely up. A local expert (Jay Cotton) looked at our
> sniffer trace, explained the problem, and offered a fix. The server end
> was "ungracefully" closing the socket connected to the client. For some
> reason (NAT device in the middle, TCP stack on the HP-UX 11.11 client,
> or?), the client thought the connection was still open. The client
> continues saying FIN after the server has sent RST. The client keeps the
> connection in the LAST_ACK state for several minutes.
>
> That's not so bad in itself but we were unlucky enough to have our server
> (Debian stable box running a 2.6 kernel) attempt a new connection to the
> same client using the same source port! The client thought it was already
> talking to the server on that port so it didn't play along and
> check_nrpe_ssl on the server timed out.
>
> Closing the connection gracefully eliminated the problem. Below is Jay's
> note describing his fix.
>
> Thanks!
>

This patch will be applied to CVS shortly (with some mods to handle a
missing closesocket() function on some OSes) and included with the NRPE
2.6 release. Thanks!


Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked