Re: [Nagios-devel] NRPE and NMAP problems?
Posted: Fri Aug 14, 2009 8:52 pm
This is a multi-part message in MIME format.
--------------050508030502080605080007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Keller, Mark D wrote:
> Hi,
>
> Can't seem to find anyone else with this problem, so hopefully this is the right place to ask.
>
> I am using NRPE 2.12 on many systems. We have an NMAP scan that happens daily. In the logs for our systems we get the following during the nmap scan:
>
> Aug 12 14:02:33 myserver nrpe[12265]: Error: Network server getpeername() failure (107: Transport endpoint is not connected)
> Aug 12 14:02:33 myserver nrpe[12265]: Daemon shutdown
>
> I can recreate the error by running: nmap -sT -p 5666 localhost
>
> The funny thing is that nrpe doesn't actually shutdown, but it does remove the pid file. So any restart scripts that rely on the pid file, now fail.
>
> Could I be doing something wrong or is this a bug? I can repeat this on Linux, Solaris, and AIX with NRPE 2.12.
>
it seems like a bug to me, although I haven't been able to reproduce it
on ubuntu.
could you test the attached diff to see if it helps any.
thanks.
--------------050508030502080605080007
Content-Type: text/x-patch;
name="nrpe.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nrpe.diff"
--- nrpe.c 2009-08-14 23:48:03.000000000 +0200
+++ /tmp/nrpe.c 2009-08-14 23:40:26.000000000 +0200
@@ -836,7 +836,7 @@
/* close socket prioer to exiting */
close(sock);
- return;
+ exit(STATE_CRITICAL);
}
/* handle signals */
@@ -859,7 +859,7 @@
/* close socket prior to exiting */
close(new_sd);
- return;
+ exit(STATE_CRITICAL);
}
nptr=(struct sockaddr_in *)&addr;
--------------050508030502080605080007--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
--------------050508030502080605080007
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Keller, Mark D wrote:
> Hi,
>
> Can't seem to find anyone else with this problem, so hopefully this is the right place to ask.
>
> I am using NRPE 2.12 on many systems. We have an NMAP scan that happens daily. In the logs for our systems we get the following during the nmap scan:
>
> Aug 12 14:02:33 myserver nrpe[12265]: Error: Network server getpeername() failure (107: Transport endpoint is not connected)
> Aug 12 14:02:33 myserver nrpe[12265]: Daemon shutdown
>
> I can recreate the error by running: nmap -sT -p 5666 localhost
>
> The funny thing is that nrpe doesn't actually shutdown, but it does remove the pid file. So any restart scripts that rely on the pid file, now fail.
>
> Could I be doing something wrong or is this a bug? I can repeat this on Linux, Solaris, and AIX with NRPE 2.12.
>
it seems like a bug to me, although I haven't been able to reproduce it
on ubuntu.
could you test the attached diff to see if it helps any.
thanks.
--------------050508030502080605080007
Content-Type: text/x-patch;
name="nrpe.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nrpe.diff"
--- nrpe.c 2009-08-14 23:48:03.000000000 +0200
+++ /tmp/nrpe.c 2009-08-14 23:40:26.000000000 +0200
@@ -836,7 +836,7 @@
/* close socket prioer to exiting */
close(sock);
- return;
+ exit(STATE_CRITICAL);
}
/* handle signals */
@@ -859,7 +859,7 @@
/* close socket prior to exiting */
close(new_sd);
- return;
+ exit(STATE_CRITICAL);
}
nptr=(struct sockaddr_in *)&addr;
--------------050508030502080605080007--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]