Page 1 of 1

Whoops! Error:Could not read object...

Posted: Mon Jun 18, 2012 6:50 am
by emyasarr
Hello;

there is strange error after installation on Nagios;

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.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL

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

Running pre-flight check on configuration data...

Checking services...
Checked 8 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 1 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

Code: Select all

cat nagios.log
[1340007688] Nagios 2.6 starting... (PID=11346)
[1340007688] LOG VERSION: 2.0
[1340007688] Finished daemonizing... (New PID=11347)
[1340009792] Caught SIGTERM, shutting down...
[1340009792] Successfully shutdown... (PID=11347)
[1340009792] Nagios 2.6 starting... (PID=23335)
[1340009792] LOG VERSION: 2.0
[1340009792] Finished daemonizing... (New PID=23336)
[1340010652] Caught SIGHUP, restarting...
[1340010652] Nagios 2.6 starting... (PID=23336)
[1340010652] LOG VERSION: 2.0
[1340010666] Caught SIGTERM, shutting down...
[1340010666] Successfully shutdown... (PID=23336)
[1340010666] Nagios 2.6 starting... (PID=29220)
[1340010666] LOG VERSION: 2.0
[1340010666] Finished daemonizing... (New PID=29221)
[1340010898] Caught SIGTERM, shutting down...
[1340010898] Successfully shutdown... (PID=29221)
[1340010898] Nagios 2.6 starting... (PID=30531)
[1340010898] LOG VERSION: 2.0
[1340010898] Finished daemonizing... (New PID=30532)
[1340012157] Caught SIGTERM, shutting down...
[1340012157] Successfully shutdown... (PID=30532)
[1340012157] Nagios 2.6 starting... (PID=5437)
[1340012157] LOG VERSION: 2.0
[1340012157] Finished daemonizing... (New PID=5438)
[1340015757] Auto-save of retention data completed successfully.
[1340018534] Caught SIGTERM, shutting down...
[1340018534] Successfully shutdown... (PID=5438)
[1340018535] Nagios 2.6 starting... (PID=10092)
[1340018535] LOG VERSION: 2.0
[1340018535] Finished daemonizing... (New PID=10093)

Code: Select all

/etc/nagios/ ls -l 
-rwxrwsrwx 1 root root 9546 Jul 15 2009 cgi.cfg*
-rwxrwsrwx 1 root root 15760 Sep 23 2009 command.cfg*
-rwxrwsrwx 1 root root 8583 Jul 15 2009 commands.cfg*
-rwxrwsrwx 1 root root 12363 Jul 15 2009 localhost.cfg*
-rwxrwsrwx 1 root root 30213 Jul 15 2009 nagios.cfg*
-rwxrwsrwx 1 root root 5329 May 3 2007 nsca.cfg*
-rwxrwsrwx 1 root nagios 1334 Jul 15 2009 resource.cfg*
drwxrwsrwx 2 nagios nagios 4096 Jun 18 11:15 rw/
-rwxrwsrwx 1 root root 1628 May 3 2007 send_nsca.cfg*
drwxrwsrwx 4 nagios nagios 4096 Jun 18 11:16 spool/


there is no error on log file there no missing permission so where is my mistake??

any idea?

Re: Whoops! Error:Could not read object...

Posted: Mon Jun 18, 2012 10:46 am
by agriffin
So you see that error when you try to start Nagios? My guess is that you aren't pointing Nagios at the right main config file. What happens when you run the following command?

Code: Select all

/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Re: Whoops! Error:Could not read object...

Posted: Tue Jun 19, 2012 4:42 am
by emyasarr
this is my problem :( i attached to post

also

Code: Select all

/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
result is nothing :|

Re: Whoops! Error:Could not read object...

Posted: Tue Jun 19, 2012 1:07 pm
by lmiltchev
Check to see if apache is added to the nagios and nagcmd groups:

Code: Select all

cat /etc/group