Page 1 of 1

Unable to start Source

Posted: Fri Nov 08, 2013 10:10 am
by scusting
Hi,

I am running the Network Analyzer VM image and I have added a Source, but it will not start. I click the Start action and it attempts to start but the following is logged in backend.log:

Code: Select all

Error running initialization.
Could not start nfcapd listening on 2055 for source Router1
I dont think I have done anything with the install other than change the default passwords.

Thanks.

Jim.

Re: Unable to start Source

Posted: Fri Nov 08, 2013 10:33 am
by scusting
I found another thread which mentions the issue: http://support.nagios.com/forum/viewtop ... 1&start=10

That issue appears to be down to OpenVZ, but I'm trying to run the VM under ESX. The error message does appear to be the same though:

Code: Select all

#sh /usr/local/nagiosna/bin/nagiosna start
Traceback (most recent call last):
  File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
    import rrdtool
ImportError: librrd.so.4: cannot open shared object file: No such file or directory
No such directory: /usr/local/nagiosna/var/Router2/flows
No such directory: /usr/local/nagiosna/var/Router2/flows
stat() error /usr/local/nagiosna/var/Router2/flows: No such file or directory
Failed to add default data collector directory
NagiosNA backend started...
I found if I manually create the Router2 & Router2/flows directories I can then get the source to start, though I do still get an error in the backend.log file:

Code: Select all

#sh /usr/local/nagiosna/bin/nagiosna start
Traceback (most recent call last):
  File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
    import rrdtool
ImportError: librrd.so.4: cannot open shared object file: No such file or directory
NagiosNA backend started...
Thanks.

Re: Unable to start Source

Posted: Fri Nov 08, 2013 12:36 pm
by lmiltchev
What is the version of the rrdtool that you are using? Run the following commands and show us the output:

Code: Select all

which rrdtool
cat /etc/sudoers.d/nna_conf

Re: Unable to start Source

Posted: Sat Nov 09, 2013 3:45 am
by scusting

Code: Select all

/usr/local/bin/rrdtool

[root@localhost ~]# cat /etc/sudoers.d/nna_conf
Defaults:%nnacmd !requiretty

Cmnd_Alias LIST = /sbin/iptables --list
Cmnd_Alias SAVE = /etc/init.d/iptables save
Cmnd_Alias UPDATE = /sbin/iptables -I INPUT -p udp -j ACCEPT --dport *
Cmnd_Alias DAEMON = /usr/local/nagiosna/bin/nagiosna *

%nnacmd ALL=(ALL) NOPASSWD:LIST
%nnacmd ALL=(ALL) NOPASSWD:SAVE
%nnacmd ALL=(ALL) NOPASSWD:UPDATE
%nnacmd ALL=(ALL) NOPASSWD:/bin/kill *
%nnacmd ALL=(ALL) NOPASSWD:DAEMON

Re: Unable to start Source

Posted: Mon Nov 11, 2013 12:15 pm
by slansing
Can you show the output of:

Code: Select all

yum list installed | grep rrd

Re: Unable to start Source

Posted: Mon Nov 11, 2013 12:21 pm
by lmiltchev
Modify the "/etc/sudoers.d/nna_conf" file, so it is going to look like this:
Defaults:%nnacmd !requiretty

Host_Alias HOST = localhost

Cmnd_Alias LIST = /sbin/iptables --list
Cmnd_Alias SAVE = /etc/init.d/iptables save
Cmnd_Alias UPDATE = /sbin/iptables -I INPUT -p udp -j ACCEPT --dport *
Cmnd_Alias DAEMON = /usr/local/nagiosna/bin/nagiosna *

%nnacmd ALL=(ALL) NOPASSWD:LIST
%nnacmd ALL=(ALL) NOPASSWD:SAVE
%nnacmd ALL=(ALL) NOPASSWD:UPDATE
%nnacmd ALL=(ALL) NOPASSWD:/bin/kill *
%nnacmd ALL=(ALL) NOPASSWD:DAEMON
After this, try restarting the PID on the source via the web interface. Let me know if this helped.