Error: Could not read object configuration data!

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
tpirart
Posts: 2
Joined: Thu Aug 11, 2011 2:40 am

Error: Could not read object configuration data!

Post by tpirart »

Hi,

I'm trying to implement a nagios server.

Implementation :
VM on VMware with Centos 5.5 x64
Nagios install through rpmforge : version 3.2.3

When i run : /usr/bin/nagios -v /etc/nagios/nagios.conf, I get this :

Code: Select all

Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config file '/etc/nagios/objects/templates.cfg'...
Processing object config file '/etc/nagios/objects/localhost.cfg'...
Processing object config file '/etc/nagios/objects/hosts.cfg'...
Processing object config file '/etc/nagios/objects/services.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
        Checked 10 services.
Checking hosts...
        Checked 3 hosts.
Checking host groups...
        Checked 1 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        Checked 2 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 24 commands.
Checking time periods...
        Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
When I try to start nagios with : service nagios start, I get this

Code: Select all

nagios is stopped
Configuration validation failed                            [FAILED]
So I start nagios in debug mode with : /usr/bin/nagios -d /etc/nagios/nagios.cfg

Here is the nagios.log :

Code: Select all

[Thu Aug 11 09:55:31 2011] Nagios 3.2.3 starting... (PID=14342)
[Thu Aug 11 09:55:31 2011] Local time is Thu Aug 11 09:55:31 CEST 2011
[Thu Aug 11 09:55:31 2011] LOG VERSION: 2.0
[Thu Aug 11 09:55:31 2011] Finished daemonizing... (New PID=14343)
When I try to access the nagios web page for hosts, I get :

Code: Select all

Whoops!

Error: Could not read object configuration data!

Here are some things you should check in order to resolve this error:

    Verify configuration options using the -v command-line option to check for errors.
    Check the Nagios log file for messages relating to startup or status data errors. 

Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at http://www.nagios.org. 
I found no error in the config neither the log.

Can anyone give some tips to go further in my troubleshooting.

Thanks in advance.
tpirart
Posts: 2
Joined: Thu Aug 11, 2011 2:40 am

Re: Error: Could not read object configuration data!

Post by tpirart »

After googleling a liitle bit, I found a solution.
It is linked with selinux.

I have to change in /etc/selinux/config

the line
selinux=enforcing
must be changed in
selinux=disabled
Then restart the VM and all work perfectly !
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Error: Could not read object configuration data!

Post by mguthrie »

Right on! Thanks for posting the solution : )
mrnico
Posts: 3
Joined: Fri Aug 05, 2011 12:27 pm

Re: Error: Could not read object configuration data!

Post by mrnico »

hi!
i have the same error but yout fix dont work.. =/

something else?
Locked