Page 1 of 2

Unable to start Source

Posted: Mon Mar 07, 2016 1:44 pm
by gwakem
This is on a RHEL 7.2 box.
Now that we have the Network Analyzer up and running, I have created a new source (NetflowListener1,) and attempted to start it. Unfortunately, It doesn't start. Looking at the advanced settings while editing, I saw that it stated that it would create the data directory of /usr/local/nagiosna/var/NetflowListener1 and to make sure the users are nna:users and the permissions are 775.

Code: Select all

13:36:18 [root@netanalyzer var]# pwd
/usr/local/nagiosna/var
13:41:40 [root@netanalyzer var]# ll
total 8.0K
drwsrwsr-x+ 2 nna nnacmd   56 Mar  7 13:36 .
drwsrwsr-t  7 nna nnacmd   60 Mar  3 14:39 ..
-rw-rw-r--+ 1 nna nnacmd 1.2K Mar  7 13:38 backend.log
-rw-rw-r--+ 1 nna nnacmd  495 Mar  7 13:41 cmdsubsys.log
-rwxrwxr-x  1 nna nnacmd    0 Mar  3 14:39 .keep
13:41:43 [root@netanalyzer var]# ll ../
total 12K
drwsrwsr-t   7 nna  nnacmd   60 Mar  3 14:39 .
drwxr-xr-x. 14 root root   4.0K Mar  3 14:39 ..
drwsrwsr-t   2 nna  nnacmd 4.0K Mar  3 14:39 bin
drwsrwsr-t+  2 nna  nnacmd   18 Mar  3 14:39 etc
drwsrwsr-t   2 nna  nnacmd 4.0K Mar  3 14:39 scripts
drwsrwsr-t   2 nna  nnacmd   18 Mar  3 14:39 tmp
drwsrwsr-x+  2 nna  nnacmd   56 Mar  7 13:36 var
It doesn't look like it created the directory, which would likely be why it doesn't start. I attempted to create the directory and set the users/permissions, but it still refused to start. I am assuming other files/directories need to be nested in there, but am not sure. Any ideas?

Re: Unable to start Source

Posted: Mon Mar 07, 2016 2:02 pm
by gwakem
I have attached the apache error log.. it looks pretty unhappy.

Re: Unable to start Source

Posted: Mon Mar 07, 2016 2:32 pm
by lmiltchev
I wonder if NNA was fully installed. I noticed the following line in the "error_log.txt":

Code: Select all

ImportError: No module named rrdtool
Can you run the following commands, and show the output?

Code: Select all

which rrdtool
whereis rrdtool
rrdtool --version

Re: Unable to start Source

Posted: Mon Mar 07, 2016 2:40 pm
by gwakem
I saw that too but in looking through the install.log, I saw it compiled and installed correctly. Here is the output:

Code: Select all

14:38:48 [root@netanalyzer nagiosna]# which rrdtool
/usr/local/bin/rrdtool
14:38:52 [root@netanalyzer nagiosna]# whereis rrdtool
rrdtool: /usr/local/bin/rrdtool
14:38:59 [root@netanalyzer nagiosna]# rrdtool --version
RRDtool 1.4.9  Copyright 1997-2013 by Tobias Oetiker <[email protected]>
               Compiled Mar  3 2016 14:38:17

Usage: rrdtool [options] command command_options
Valid commands: create, update, updatev, graph, graphv,  dump, restore,
		last, lastupdate, first, info, fetch, tune,
		resize, xport, flushcached

RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html)

For more information read the RRD manpages

Re: Unable to start Source

Posted: Mon Mar 07, 2016 3:01 pm
by jolson
A few things:

Code: Select all

service nagiosna restart
service crond restart
tail /var/log/cron
ls -l /usr/local/nagiosna/scripts
service mysqld status
cat /etc/sudoers
chage -l nagios
grep nag /etc/passwd /etc/group
Please run the commands listed above and return the results to us. Thank you!

Re: Unable to start Source

Posted: Mon Mar 07, 2016 3:13 pm
by gwakem
I have attached the output. Thanks!

Re: Unable to start Source

Posted: Mon Mar 07, 2016 3:45 pm
by jolson

Code: Select all

  File "/usr/local/nagiosna/bin/initialize_source.py", line 16, in <module>
    import rrdtool
ImportError: No module named rrdtool
Give this a try:

Code: Select all

yum install rrdtool-python

Code: Select all

service nagiosna restart
You might need to make a new source to see this work properly.

Re: Unable to start Source

Posted: Mon Mar 07, 2016 3:56 pm
by gwakem
I will give this a try shortly and let you know the results. Thanks!

Re: Unable to start Source

Posted: Mon Mar 07, 2016 4:04 pm
by jolson
No problem - looking forward to your results!

Re: Unable to start Source

Posted: Mon Mar 07, 2016 5:32 pm
by gwakem
And that did it! I did see this when restarting:

Code: Select all

17:28:39 [root@netanalyzer ~]# service nagiosna restart
NagiosNA backend stopped.
sudo: /etc/init.d/iptables: command not found
NagiosNA backend started...
But its started! Thanks for your help.