Unable to start Source

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Unable to start Source

Post 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?
--
Griffin Wakem
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Unable to start Source

Post by gwakem »

I have attached the apache error log.. it looks pretty unhappy.
You do not have the required permissions to view the files attached to this post.
--
Griffin Wakem
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Unable to start Source

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Unable to start Source

Post 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 <tobi@oetiker.ch>
               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
--
Griffin Wakem
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Unable to start Source

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Unable to start Source

Post by gwakem »

I have attached the output. Thanks!
You do not have the required permissions to view the files attached to this post.
--
Griffin Wakem
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Unable to start Source

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Unable to start Source

Post by gwakem »

I will give this a try shortly and let you know the results. Thanks!
--
Griffin Wakem
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Unable to start Source

Post by jolson »

No problem - looking forward to your results!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
User avatar
gwakem
Posts: 238
Joined: Mon Jan 23, 2012 2:02 pm
Location: Asheville, NC

Re: Unable to start Source

Post 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.
--
Griffin Wakem