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.
rameshAGB
Posts: 1
Joined: Fri Apr 17, 2015 4:30 am

Error: Could not read object configuration data!

Post by rameshAGB »

HI im new to Nagios.

Installed Nagios3 in Ubuntu server , as given

https://help.ubuntu.com/lts/serverguide ... figuration

After the installation, Im able to login to index page, but other link shows "Error: Could not read object configuration data!".

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

both shows, configuration is fine. Any one can help one this ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Could not read object configuration data!

Post by abrist »

This is most likely a permissions issue. You need to verify that your web group (apache or www-data usually) has permissions on the nagios directory:

Code: Select all

grep nag /etc/group
ls -la /usr/local/nagios/share
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Error: Could not read object configuration data!

Post by venkatklr »

Hi,

Even I am getting same error. Apache is on same group. Please help!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Error: Could not read object configuration data!

Post by lmiltchev »

Have you done this:
1.Verify configuration options using the -v command-line option to check for errors.
2.Check the Nagios log file for messages relating to startup or status data errors.
Also, have you tried restarting apache2?

Is SELinux enabled?
Be sure to check out our Knowledgebase for helpful articles and solutions!
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Error: Could not read object configuration data!

Post by venkatklr »

yes SELinux is enabled.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Could not read object configuration data!

Post by abrist »

Please disable selinux for testing purposes, and then try again. You may have issues with context.

Code: Select all

setenforce 0
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Error: Could not read object configuration data!

Post by venkatklr »

Still same issue.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Error: Could not read object configuration data!

Post by abrist »

Can you post the output of:

Code: Select all

service nagios status
ps -aef | grep nagios.cfg
grep nag /etc/group
ls -la /usr/local/nagios/sbin
ls -la /usr/local/nagios/var
cat /etc/httpd/conf.d/nagios.conf
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
venkatklr
Posts: 13
Joined: Tue Jun 23, 2015 6:53 am

Re: Error: Could not read object configuration data!

Post by venkatklr »

PFA...
Attachments
logsofNagios.docx
(94.49 KiB) Downloaded 519 times
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Error: Could not read object configuration data!

Post by lmiltchev »

If you are using Ubuntu, In the "/etc/group" you should have "www-data" instead of "apache":

Code: Select all

nagios:x:1000:nagios,www-data
nagcmd:x:1001:nagios,www-data
If you are on RHEL/CentOS, you should have:

Code: Select all

nagios:x:1000:nagios,apache
nagcmd:x:1001:nagios,apache
Do you have any config errors?

Ubuntu (repo):

Code: Select all

nagios3 -v /etc/nagios3/nagios.cfg
Source Install:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
According to your screenshot, nagios is NOT running...

Try:

Code: Select all

rm -f /usr/local/nagios/var/nagios.lock
service nagios3 start
or

Code: Select all

service nagios start
Check to see if nagios is running:

Code: Select all

ps aux | grep nagios
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked