Nagios Core not reading config file

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.
Locked
juanmaa1414
Posts: 1
Joined: Wed Jun 22, 2016 2:39 pm

Nagios Core not reading config file

Post by juanmaa1414 »

Hi everyone. I've installed Nagios Core on my gnu/linux machine by following entirely the Quickstart Guide (ubuntu dist page), and I don't can run it via #/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg so this return this error:

Code: Select all

Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/usr/local/nagios/etc/nagios.cfg' for reading!
   Error processing main config file!
-Under Slackware 14.0 x64 with Apache/2.4.3. It's my 3rd attempt. The nagios.cfg is here:

Code: Select all

ls -la /usr/local/nagios/etc 
total 76
drwxrwxr-x 3 nagios nagios  4096 Jun 22 10:23 ./
drwxr-xr-x 9 root   root    4096 Jun 22 10:30 ../
-rw-rw-r-- 1 nagios nagios 12267 Jun 22 10:12 cgi.cfg
-rw-r--r-- 1 root   root      50 Jun 22 10:23 htpasswd.users
-rw-rw-r-- 1 nagios nagios 44831 Jun 22 10:12 nagios.cfg
drwxrwxr-x 2 nagios nagios  4096 Jun 22 10:12 objects/
-rw-rw---- 1 nagios nagios  1312 Jun 22 10:12 resource.cfg
Thanks.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Core not reading config file

Post by tgriep »

Can you run the verification like below with the extra output and see if there are more details on the error?

Code: Select all

/usr/local/nagios/bin/nagios -vv /usr/local/nagios/etc/nagios.cfg
Is selinux installed and enabled on the system? That could cause the error.
Run this to see if it is enabled,If it is enabled, you need to disable it.

Code: Select all

getenforce
Is the /usr/local/nagios folder and it's sub folders readable by the nagios user and the nagios group?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked