Page 8 of 13

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 9:41 am
by jfrickson
rseiwert wrote: With one process what's it using inter-process communication for then?
It doesn't daemonize, but it fork()s off a DB writer process and a child process. Those two use IPC to communicate.

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 9:47 am
by jfrickson
If the ndo2db.debug doesn't tell us anything, I'm working on some changes that should tell us where the problem is. It may take a few iterations to narrow it down, but we should be able to track down the problem fairly quickly.

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 11:33 am
by jfrickson
Bandit,

Attached is a patch to ndo2db.c. Save it in the src directory. Then use the same procedure as before, but instead of editing the file do this:

Code: Select all

patch < ndo2db.c.patch
This version will daemonize so you don't have to keep a shell open.

It will create files in the /usr/local/nagios/var directory. As each child process starts, it will create a debug_%d_.log where the %d is replaced by the process id. As each child ends successfully, it will delete it's log file. So when it crashes, there should only be the log files from the processes that were active at the crash. If they are small, you can just paste the contents into a message here. If they are bit, zip them up and attach them.

[EDIT] changed patch < ndo2db.c to patch < ndo2db.c.patch. I hope you knew what I meant :oops:

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 11:34 am
by BanditBBS
I just PM'd the debug log to jfrickson. Will now do as you asked with the other file

EDIT: rememebr, its not technically crashing, its hanging...we are using the term interchangeably here and just wanted to point that our again to make sure no misunderstanding

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 11:54 am
by tmcdonald
Might I grab a copy of those logs as well?

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 12:16 pm
by BanditBBS
tmcdonald wrote:Might I grab a copy of those logs as well?
Sent....done with lunch now so will get the new ndo2db in place in the next few minutes too

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 12:27 pm
by BanditBBS
Issue with the patched ndo2db.

It isn't writing a log for each child process, its writing just one log file for the main one and growing quick.

Code: Select all

[nagios@iss-chi-nag09 var]$ ll
total 655808
-rw-r--r-- 1 nagios nagios 416186519 Aug 26 12:26 debug_29445_.log
-rw-r--r-- 1 nagios nagios  13333640 Aug 26 12:26 ndo2db.debug
-rw-r--r-- 1 nagios nagios  20003076 Aug 26 12:26 ndo2db.debug.old
-rw-r--r-- 1 nagios nagios         6 Aug 26 12:22 ndo2db.lock
-rw-r--r-- 1 root   root   222007026 Aug 21 13:44 ndo2db.log
[nagios@iss-chi-nag09 var]$ ps -ef|grep ndo2db
nagios   29445     1  0 12:22 ?        00:00:00 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   29485 29445  1 12:23 ?        00:00:02 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   29486 29485 13 12:23 ?        00:00:29 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg
nagios   29742 29374  0 12:26 pts/2    00:00:00 grep ndo2db
[nagios@iss-chi-nag09 var]$

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 12:30 pm
by jfrickson
BanditBBS wrote:Issue with the patched ndo2db.

It isn't writing a log for each child process, its writing just one log file for the main one and growing quick.
Ok, kill it off and run your usual version. I'll get it fixed shortly.

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 12:39 pm
by jfrickson
Ok, try this one...

Re: NDO2DB Issue out of the blue

Posted: Wed Aug 26, 2015 12:44 pm
by BanditBBS
jfrickson wrote:Ok, try this one...
Am I supposed to use both patch files? I didn't and applied the patch to the original source and got this:

Code: Select all

[root@iss-chi-nag09 src]# patch < ndo2db.c.patch
patch: **** Only garbage was found in the patch input.
If I am supposed to do it to the previously patched file, just let me know and I'll do that :)