problem installing ndo2db/ndoutils on nagios 3.2.3

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by slansing »

Looks like you have a lock file hanging around, run the following and then it should start normally:

Code: Select all

rm /usr/local/nagios/var/ndo.sock
/usr/local/nagios/bin/ndo2db-4x -c /usr/local/nagios/etc/ndo2db.cfg
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by majed »

that didn't help
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by sreinhardt »

Did you get any additional output from it, or still the bind socket issue?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by majed »

same issue

root@oversun:~# /etc/init.d/ndo2db restart
ndo2db was not running... could not stop
Starting ndo2db:Could not bind socket: Address already in use
done.
root@oversun:~#

ndo2db cannot be restart without a kill.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by abrist »

Is the lock file stuck?

Code: Select all

ls -la /usr/local/nagios/var/ndo2db.lock
If so, remove it and try to restart it:

Code: Select all

rm /usr/local/nagios/var/ndo2db.lock
service ndo2db start
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by majed »

Code: Select all

root@oversun:~# ls -la /usr/local/nagios/var/ndo2db.lock
-rw-r--r-- 1 nagios nagios 0 May 27 15:24 /usr/local/nagios/var/ndo2db.lock

Code: Select all

root@oversun:~# rm /usr/local/nagios/var/ndo2db.lock
root@oversun:~# /etc/init.d/ndo2db restart
ndo2db was not running... could not stop
Starting ndo2db:Could not bind socket: Address already in use
 done.
root@oversun:~#
in nagios.log

Code: Select all

[1401310792] ndomod: Still unable to connect to data sink.  19388011 items lost, 50000 queued items to flush.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by scottwilkerson »

Too many thins happening at the same time and I would guess we have multiple copies running...

Let run the following in order

Code: Select all

/etc/init.d/ndo2db stop
killall -9 ndo2db
rm -f /usr/local/nagios/var/ndo2db.lock
rm /usr/local/nagios/var/ndo.sock
/etc/init.d/ndo2db start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by majed »

Code: Select all

root@oversun:~# /etc/init.d/ndo2db stop
ndo2db was not running... could not stop
root@oversun:~# killall -9 ndo2db
root@oversun:~# rm -f /usr/local/nagios/var/ndo2db.lock
root@oversun:~# rm /usr/local/nagios/var/ndo.sock
rm: cannot remove `/usr/local/nagios/var/ndo.sock': No such file or directory
root@oversun:~# rm /var/cache/nagios3/ndo.sock
root@oversun:~# /etc/init.d/ndo2db start
Starting ndo2db: done.
root@oversun:~# /etc/init.d/nagios restart
Running configuration check...
Stopping nagios: .done.
Starting nagios: done.
root@oversun:~#
1401685003] ndomod: Still unable to connect to data sink. 22297835 items lost, 50000 queued items to flush.
[1401685005] ndomod: Still unable to connect to data sink. 22282591 items lost, 50000 queued items to flush.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by tmcdonald »

Seeing as you have multiple versions of Core running (in various functional states), would it be possible to reinstall Ubuntu and start over with a clean system? That way we can move forward with installing Core and ndo* using the same methods (either both from source or both from apt-get).
Former Nagios employee
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: problem installing ndo2db/ndoutils on nagios 3.2.3

Post by majed »

i don't have multiple cores running and it is not wise to reinstall ubuntu. It's better to make a new virtual machine with new ubuntu and install both from source. I will repost after doing it.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
Locked