5R1.0 Upgrade error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

5R1.0 Upgrade error

Post by marquetteu »

Getting a strange error on upgrade being caused by the install-templates script, hosttemplates.cfg doesn't even have 376 lines. below is the error, attached is the cfg file

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...
   Read main config file okay...
Error: Template 'use' specified in host definition could not be not found (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting on line 376)
   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.

[update 1]
The problem seems to be in the xiwizard templates for both host and service templates -- the use lines are blank and that is making nagios core 4.1.1 angry attachment deleted
[/update 1]
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 5R1.0 Upgrade error

Post by lmiltchev »

What is the Nagios XI version that you are upgrading from? Can you post the entire "/usr/local/nagiosxi/tmp/upgrade.log"? Do you see any config errors when you run the Write Config Tool?

CCM->Write Config Files->Write->Verify

Can you apply configuration successfully?
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: 5R1.0 Upgrade error

Post by marquetteu »

when i have the config write it will not verify and i am unable to apply the config -- it creates empty "use" lines. To fix it, i had to modify the install-templates line so that it didn't do the reconfigure, then delete all the wizards, manually delete the wizard templates and then manually run the reconfigure

we are upgrading from 4.7
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 5R1.0 Upgrade error

Post by lmiltchev »

To fix it, i had to modify the install-templates line so that it didn't do the reconfigure, then delete all the wizards, manually delete the wizard templates and then manually run the reconfigure
Let's clarify - you tried the upgrade but it failed. Then, you deleted all of the wizards & wizard templates, and ran reconfigure_nagios.sh. Is this correct?
Did you delete wizards & templates from the command line or in the CCM?

Check for config errors again - run the Write Config Tool and if there are no errors, Apply Configuration. If there are errors, fix them in the CCM, then Apply Configuration. Only after you clear ALL of the config error, you can rerun the upgrade script. Use the "-f" flag to force upgrading of all of the addons & wizards.

Code: Select all

cd /tmp/nagiosxi
./upgrade -f
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: 5R1.0 Upgrade error

Post by marquetteu »

no. What i had to do was the following:

edit upgrade commenting out ./install-templates
run the upgrade
login to the partially upgraded system deleting all wizards and xiwizard templates
clear configuration, write configuration files, verify and apply config
manually run install-templates

[update]
I also ran ./upgrade -f and got the same error as before
[/update]
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 5R1.0 Upgrade error

Post by lmiltchev »

Post the "/usr/local/nagios/etc/hosttemplates.cfg" so that we can take a look at it. Also, run the Write Config Tool and show the output after clicking on each button (in the following order):

CCM->Tools->Write Config Files->Delete->Write->Verify
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: 5R1.0 Upgrade error

Post by ssax »

*** Please follow these steps in order without doing anything in between (don't apply config).

Go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Now zip up your /usr/local/nagios/etc directory and PM that to me so that we can look through it.

Thank you
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: 5R1.0 Upgrade error

Post by marquetteu »

Do you want the file pre or post upgrade?

thanks!
Adam
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: 5R1.0 Upgrade error

Post by lmiltchev »

Do you want the file pre or post upgrade?
We would like to review your configs as of now, so run the Write Config Tool as suggested by ssax. Don't apply configuration. Zip up "/usr/local/nagios/etc/" directory and PM the zip file to ssax (or any of us on the Nagios support team). Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked