NDO2DB Issue out of the blue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jfrickson

Re: NDO2DB Issue out of the blue

Post 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.
jfrickson

Re: NDO2DB Issue out of the blue

Post 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.
jfrickson

Re: NDO2DB Issue out of the blue

Post 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:
You do not have the required permissions to view the files attached to this post.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NDO2DB Issue out of the blue

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NDO2DB Issue out of the blue

Post by tmcdonald »

Might I grab a copy of those logs as well?
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NDO2DB Issue out of the blue

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NDO2DB Issue out of the blue

Post 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]$
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
jfrickson

Re: NDO2DB Issue out of the blue

Post 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.
jfrickson

Re: NDO2DB Issue out of the blue

Post by jfrickson »

Ok, try this one...
You do not have the required permissions to view the files attached to this post.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: NDO2DB Issue out of the blue

Post 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 :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked