-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nagios hangs on reload while sending external command to cmd file #319
Comments
Fix for issue #319 In an earlier fix, I was apparently trying to be overly clever. This fix, proposed by xaoc-krsk, does the trick.
Fixed in branch |
Considering Nagios 4.3.x is unstable with mod_gearman at the moment (sni/mod_gearman#110) .. think we can get a 4.2.x release with this patch? |
@wleese Are you confirming that john's patch in 4.3.3 did not work? |
No, sorry. I'm saying that we cannot run 4.3.3 due to sni/mod_gearman#110 (which is an assumption, it's not something that I have tested personally). |
@wleese I could create a branch for you to compile from source, but I cannot release a 4.2.5 publicly as we do not maintain multiple minor revisions simultaneously. This would be beneficial as I could actually have someone verify that the fix worked :) Does this sound ok to you? |
I'm afraid I'm working on too many assumptions, but I can reproduce 'my' issue by repeating these commands: /etc/init.d/nagios reload; echo "[1386672918] PROCESS_SERVICE_CHECK_RESULT;local-xxxx-001.localdomain;check_nrpe_status_on_local-xxxx-001.localdomain;0;I'm OK" ..after about 3 times the nagios startup will hang:
I also end up with 2 nagios processes (which kinda makes sense?):
/var/log/nagios/nagios.debug is empty.
nagios-4.2.4 I'm willing to test the patch to see if it helps. Again, assuming this is the same problem. Whatever is happening i've ruled out mod_gearman and livestatus by disabling them. |
Confirmed that this issue affects us.
|
Tested cde8780 .. works like a charm |
Glad to hear it! Also, I'll be digging into the mod gearman issue on Wednesday, so hopefully we won't have anyone hung up on not upgrading. |
Original ticket: http://tracker.nagios.org/view.php?id=548
When you send a command to cmd file and reload nagios at the same time, you end up in
command_input_handler
, spinning in this block indefinitely:Since this is main nagios process, we will never set
sigrestart
back to false.Proposed patch fixes this problem, by immediately returning from
command_input_handler
while we are reloading. We just don't read any command during reload, next command will be read immediately after reload is finished.Attached patch is for version 4.2.4.
base-commands.c.txt
The text was updated successfully, but these errors were encountered: