Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622468 - net-analyzer/nrpe-3.1.1: /etc/init.d/nrpe does not stop all nrpe processes
Summary: net-analyzer/nrpe-3.1.1: /etc/init.d/nrpe does not stop all nrpe processes
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sysadmin Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-22 12:06 UTC by Tomáš Mózes
Modified: 2017-07-17 04:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Mózes 2017-06-22 12:06:07 UTC
During the glibc update I noticed that /etc/init.d/nrpe does not stop all nrpe processes.

How to simulate:
/etc/init.d/nrpe start
schedule all services check on that host
ps ax | grep nrpe -> shows multiple processes
/etc/init.d/nrpe stop
ps ax | grep nrpe -> some still running

Should this be reported upstream or we handle it some way?
Comment 1 Michael Orlitzky gentoo-dev 2017-06-22 13:38:43 UTC
Which processes are left running? The main daemon process and its children (i.e. what get created by /etc/init.d/nrpe start) should be killed by the corresponding "stop". Does that fail, or is it some other processes that got created in the meantime that stick around?
Comment 2 Tomáš Mózes 2017-06-22 14:25:25 UTC
# ps auxww | grep nrpe
nagios    1259  0.0  0.0  25904  2432 ?        Ss   16:14   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
nagios    3196  0.0  0.0  25904  2948 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
nagios    3242  3.0  0.1  26592  4156 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
nagios    3251  3.0  0.1  26592  4156 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
nagios    3259  0.0  0.0  26592  2084 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
nagios    3272  0.0  0.0  26592  2084 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon

# /etc/init.d/nrpe stop
 * Stopping nrpe ...      

# /etc/init.d/nrpe status
 * status: stopped

# ps auxww | grep nrpe
nagios    3196  0.0  0.0  25904  2948 ?        S    16:17   0:00 /usr/bin/nrpe -c /etc/nagios/nrpe.cfg --daemon
Comment 3 Michael Orlitzky gentoo-dev 2017-07-15 19:17:09 UTC
Do any of the upstream init files (from the startup directory) fare any better? I'm not sure what the problem is, but I'm planning on sending our simplified init script upstream and don't want to make anything worse.
Comment 4 Tomáš Mózes 2017-07-17 04:48:59 UTC
Seems like it's fixed in 3.2.0 as I cannot reproduce it any more. The problem was with longer running checks when nrpe forked a few new processes (for example when forcing a check of all services on a host) and during that time I did nrpe restart (after upgrade).