[Pkg-nagios-devel] Bug#416535: nagios-nrpe-plugin: check_nrpe crash if nrpe server doesn't allow the client IP address

Julien Desfossez ju at klipix.org
Wed Mar 28 20:08:40 CET 2007


Package: nagios-nrpe-plugin
Version: 2.5.1-3
Severity: important

When check_nrpe contacts a NRPE server who doesn't allow the IP address it exit with return code 141.
It should normally return 3.

I've tried with the original source and it works, so there is a problem with the patch but I can't find it.

Here is the test case with the check_nrpe provided by the package :
nagios:/# /usr/lib/nagios/plugins/check_nrpe -H 10.3.0.24 -c check_cpu
nagios:/# echo $?
141

The interesting part of the strace is the end :
write(3, "\27\3\1\0 \350\237Or{X\343\2521l\301\346\360\353\273\313"..., 1114) = 1114
read(3, 0x805d3b8, 5)                   = -1 ECONNRESET (Connection reset by peer)
alarm(0)                                = 10
write(3, "\25\3\1\0 \326\17\341\2627\232,\240\304\363\30/\233\327"..., 37) = -1 EPIPE (Broken pipe)

This is a problem because Nagios considers this result as OK.

The NRPE server is a windows XP with NSClient++-20070306-1940 installed.
I've been able to reproduce this problem on a another machine just by removing the IP address of the
Nagios server

Now the test case with the same source but with patch not applied :
nagios:~/nagios-nrpe-2.5.1/src# ./check_nrpe -H 10.3.0.24 -c check_cpu
CHECK_NRPE: Received 0 bytes from daemon.  Check the remote server logs for error messages.
superca-nagios:~/nrpe-2.7.1/src# echo $?
3

I have searched in the patch but I don't find any idea to correct this problem.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-vserver-k7
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages nagios-nrpe-plugin depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libssl0.9.8                 0.9.8c-4     SSL shared libraries

Versions of packages nagios-nrpe-plugin recommends:
pn  nagios                        <none>     (no description available)

-- no debconf information






More information about the Pkg-nagios-devel mailing list