Page 1 of 1
NSTI Installation Problem
Posted: Fri Dec 07, 2012 1:23 pm
by ryan_breneman
Hello,
I just finished installing NSTI using the install.py script. Everything went fine, got all success messages through the install process. I restarted httpd and snmptt.
When I go to the nsti web url I get the following message: Could not open Configuration-File ./etc/config.ini !
I've tried changing permissions on the config.ini file (777) and tried changing owner from root to nagios, still no go.
Any thoughts?
Thanks
Ryan
Nagios XI 2012R1.2
Re: NSTI Installation Problem
Posted: Mon Dec 10, 2012 10:25 am
by mguthrie
Is SELinux enabled on this machine? Check /etc/selinux/config, and run the command:
Re: NSTI Installation Problem
Posted: Mon Dec 10, 2012 12:12 pm
by ryan_breneman
No, SELinux is disabled, see config output below:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
~
Re: NSTI Installation Problem
Posted: Mon Dec 10, 2012 4:48 pm
by scottwilkerson
I'm going to have our resident NSTI guy take a look at this when he gets in.
Re: NSTI Installation Problem
Posted: Tue Dec 11, 2012 1:14 pm
by nscott
Ryan,
Can you check to see if there is a /usr/local/nsti/etc/config.ini?
Is there anything in that etc directory?
Re: NSTI Installation Problem
Posted: Tue Dec 11, 2012 3:32 pm
by ryan_breneman
Yes, there is a config file. I've attached it to this post. In the file I removed the mysql password, but I did test the connection and I know that works. Other files in etc are backup.php and config.ini.dist.
Re: NSTI Installation Problem
Posted: Tue Dec 11, 2012 5:15 pm
by nscott
I'd like to make sure its not some Apache problem where it is resolving the pathname improperly, in the NSTI tree:
/usr/local/nsti/include/defines/global.php
There is a variable named:
define('CONST_MAINCFG', './etc/config.ini');
change that to
define('CONST_MAINCFG', '/usr/local/nsti/etc/config.ini');
And save it, then try to access it. If this doesn't work then it is almost certainly a permissions issue.
Re: NSTI Installation Problem
Posted: Mon Dec 17, 2012 7:09 am
by ryan_breneman
That did not work. I know it accepted the config change because now the error states the full path: Could not open Configuration-File /usr/local/nsti/etc/config.ini !
I originally thought the problem was permissions related and I tried modifying permissions with no success. Originally after the install script the config file was owned by root but in trying different things to make it work I changed to the nagios user, however it didn't affect the problem. Here is the output of ls-la on /usr/local/nsti/etc:
[root@nagios etc]# ls -la
total 20
drwxr-xr-x 2 root root 4096 Dec 11 15:27 .
drwxr-xr-x 7 root root 4096 Dec 7 12:59 ..
-rwxr-xr-x 1 root root 2406 Dec 7 12:35 backup.php
-rwxrwxrwx 1 nagios nagios 2430 Dec 7 12:48 config.ini
-rwxr-xr-x 1 root root 2409 Dec 7 12:35 config.ini.dist
Re: NSTI Installation Problem
Posted: Mon Dec 17, 2012 10:32 am
by scottwilkerson
Is the user apache runs under on this machine part of the nagios group?
Re: NSTI Installation Problem
Posted: Mon Dec 17, 2012 10:38 am
by ryan_breneman
Here's the output of that command:
[root@nagios ~]# cat /etc/group | grep nagios
nagios

500:nagios,apache
nagcmd

501:nagios,apache