Errors during install
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Errors during install
I ventured into the land of the brave and am installling XI on a 64 bit machine (RHEL5.4). Install is not flawless at all but after solving a lot of the errors I am now in the final stage and get:
Error: Invalid service notification option 'd' in contact definition.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 20.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
During startup I get this:
[root@xxxxxx nagiosxi]# ./F-startdaemons
Restarting Apache...
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Starting NDO2DB...
Starting ndo2db: done.
Starting Nagios Core...
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
Starting Nagios XI...
Starting PNP Daemon...
An Error occured while reading your config on line 0
Message was. "ERROR - Could not open config file - Not a directory"
Could not start NPCD
Anyone have any ideas on how to solve this?
Error: Invalid service notification option 'd' in contact definition.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 20.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
During startup I get this:
[root@xxxxxx nagiosxi]# ./F-startdaemons
Restarting Apache...
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Starting NDO2DB...
Starting ndo2db: done.
Starting Nagios Core...
Starting nagios:CONFIG ERROR! Start aborted. Check your Nagios configuration.
Starting Nagios XI...
Starting PNP Daemon...
An Error occured while reading your config on line 0
Message was. "ERROR - Could not open config file - Not a directory"
Could not start NPCD
Anyone have any ideas on how to solve this?
Re: Errors during install
Can you post the contents of that contacts.cfg file around line 20. It looks like it's hitting a syntax error in the cfg file. Both XI and Core run through a validation of configuration before starting. The command to manually verify the cfg is:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Not sure why it would do that on a fresh install though, are you using imported cfg files?
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Not sure why it would do that on a fresh install though, are you using imported cfg files?
-
diegosiassb
- Posts: 111
- Joined: Wed Dec 30, 2009 1:38 am
Re: Errors during install
me too
Why
[root@nagiosxi2 nagiosxi]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Error: Invalid service notification option 'd' in contact definition.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 20.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
You have new mail in /var/spool/mail/root
Why
[root@nagiosxi2 nagiosxi]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 3.2.2
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-01-2010
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Error: Invalid service notification option 'd' in contact definition.
Error: Could not add object property in file '/usr/local/nagios/etc/contacts.cfg' on line 20.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
You have new mail in /var/spool/mail/root
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Re: Errors during install
<snip>
Line 19: host_notification_options d,u,r,f,s,d
Line 20: service_notification_options w,u,c,r,f,s,d
Line 21: host_notification_commands xi_host_notification_handler
<snip>
If I recall correctly these values come from the database (at least, I presume the cfg's are generated on the basis of what is put in the database) ... right?
And I dont use imported cfg files.
Line 19: host_notification_options d,u,r,f,s,d
Line 20: service_notification_options w,u,c,r,f,s,d
Line 21: host_notification_commands xi_host_notification_handler
<snip>
If I recall correctly these values come from the database (at least, I presume the cfg's are generated on the basis of what is put in the database) ... right?
And I dont use imported cfg files.
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Re: Errors during install
# service_notification_options are w,u,c,r,f,n
# w=warning u=unknown c=critical r=recovery f=flapping n=none
# host_notification_options d,u,r,f,n
# d=down u=unreachable r=recovery f=flapping n=none
So why does the "d" end up in service_notification_options in the contacts.cfg????? It obviously isn't a valid configuration option....
# w=warning u=unknown c=critical r=recovery f=flapping n=none
# host_notification_options d,u,r,f,n
# d=down u=unreachable r=recovery f=flapping n=none
So why does the "d" end up in service_notification_options in the contacts.cfg????? It obviously isn't a valid configuration option....
Re: Errors during install
That is a really good question, and we're going to have to do some more looking into that. I haven't seen this issue before on 32bit installations, and up until a few weeks ago we weren't supporting 64bit installs. NagiosQL is an open-source component that is the database backend that we use for XI, and I'm not clear on the specifics of what is pre-populated in the database, but that could be a bug that we need to track down.
Did it correct the issue to remove the 'd' option from the configuration? If it does I'm going to post it as a FAQ for this issue until we figure out what's going on with this.
Did it correct the issue to remove the 'd' option from the configuration? If it does I'm going to post it as a FAQ for this issue until we figure out what's going on with this.
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Re: Errors during install
If you remove the "d" option, it will start.
But aren't config files regenerated from the NagiosQL database everytime you boot/ restart? In that case removing the "d" option will only fix the issue once
But aren't config files regenerated from the NagiosQL database everytime you boot/ restart? In that case removing the "d" option will only fix the issue once
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Re: Errors during install
Also I have seen this error in both 32 and 64 bit versions...
-
Mark de Bokx
- Posts: 43
- Joined: Wed Jul 07, 2010 1:59 am
Re: Errors during install
We fixed this temporarily by deleting the "d" entry in service_notification_options in tbl_contacts in the NagiosQL database.
Contacts.cfg is now generated correctly and Nagiosxi starts up without errors.
We havent found yet in which sql statement this value in the tbl_contacts is set incorrectly during install (because we suspect the error is situated there)
And, maybe we have triggered another misconfig by doing above mentioned fix, because when I try to enter the license data (yes we have a license!) I now get
SQL: SQL Error [nagiosxi] : ERROR: duplicate key violates unique constraint "xi_options_pkey"
*sigh*
Contacts.cfg is now generated correctly and Nagiosxi starts up without errors.
We havent found yet in which sql statement this value in the tbl_contacts is set incorrectly during install (because we suspect the error is situated there)
And, maybe we have triggered another misconfig by doing above mentioned fix, because when I try to enter the license data (yes we have a license!) I now get
SQL: SQL Error [nagiosxi] : ERROR: duplicate key violates unique constraint "xi_options_pkey"
*sigh*
Re: Errors during install
Ugh. That would be frustrating. Just a heads up, if you have a license key, we recommend posting in the Customer Forum, as we give that forum the highest priority for response time.
I haven't attempted to reproduce this yet, but it sounds like something we'll need to report as a bug. I'm going to report it on the tracker and point a link to this thread for additional information. Please feel free to add any other details that you find that might help us identify and correct this. Debugging NagiosQL is a little bit trickier since it is written with a templating engine and all of the comments are in German ; )
Just so I can clarify for the bug report, have your installations all been on RHEL, or have you seen this on the other distributions as well?
I haven't attempted to reproduce this yet, but it sounds like something we'll need to report as a bug. I'm going to report it on the tracker and point a link to this thread for additional information. Please feel free to add any other details that you find that might help us identify and correct this. Debugging NagiosQL is a little bit trickier since it is written with a templating engine and all of the comments are in German ; )
Just so I can clarify for the bug report, have your installations all been on RHEL, or have you seen this on the other distributions as well?