Page 1 of 2

Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 1:37 pm
by jacek
My upgrade from 5.5.0 to 5.5.1 failed (via web) with the following errors:

Code: Select all

ERROR 2005 (HY000): Unknown MySQL server host '-u' (1)
ERROR 1060 (42S21) at line 3: Duplicate column name 'trapdata_custom_format'
The 2nd error looks related to my previous issue: https://support.nagios.com/forum/viewtopic.php?t=49357
Attached also the complete upgrade log.

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 1:55 pm
by jomann
It looks like if you have a blank dbserver setting then you'd get this error. In order to fix it you can edit the line on 1245 from:

Code: Select all

if mysql -h $cfg__db_info__nagiosxi__dbserver -u $cfg__db_info__nagiosxi__user --password="$cfg__db_info__nagiosxi__pwd" --database=$cfg__db_info__nagiosxi__db -e 'DESCRIBE xi_cmp_trapdata' | grep -q trapdata_custom_format; then
to this:

Code: Select all

if mysql -u $cfg__db_info__nagiosxi__user --password="$cfg__db_info__nagiosxi__pwd" --database=$cfg__db_info__nagiosxi__db -e 'DESCRIBE xi_cmp_trapdata' | grep -q trapdata_custom_format; then
Removing the -h $cfg__db_info__nagiosxi__dbserver should allow you to re-run the upgrade successfully.

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 2:48 pm
by jacek
I corrected the dbserver setting in: /usr/local/nagiosxi/html/config.inc.php
It was blank, I set it to localhost (our DB was offloaded to an ext DB some time ago, so it seems that this hasn't been reverted properly).

I wonder why you didn't tell me to do this in the first place (correct the root cause, instead of working it around in the install script, which might give the same issue in next upgrades) ?

Now the log said, that the upgrade seems complete, but I still got the red box saying that it had errors, again attaching my log.

BTW - what does the "No entry for terminal type "unknown"" message mean?

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 2:54 pm
by jomann
The reason I didn't mention to change the config is because a blank dbserver variable should work, and we purposely make sure that it works in all of our scripts. This not working is actually a bug.

At the end of the day it could have been done either way though since it's both a bug and a configuration setting that can be edited.

The no terminal entry error happens from sudo, those scripts that you see that happen on are being ran through sudo.

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:08 pm
by jacek
Thank you for the clarification!

Did you take a look at my upgrade log? Can You confirm that everything is OK?

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:12 pm
by jomann
Yeah I took a look, the output is always a little dirty looking from the compilation but everything looks okay. All the things that needed upgrading upgraded with no errors.

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:17 pm
by jacek
Thank You.

I noticed, that there were some components updates available, but after installing them they seems to be still on the old version (and system saying that updates are still available).

Should I open up a separate thread for this issue?

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:22 pm
by jomann
I would click the upgrade all components button and do the same for the wizards. We only upgrade the components/wizards by force during a minor 5.x or major upgrade. So that you can determine if you want us to blow away anything customized. We have made some releases of components and wizards since 5.5 so you may have a few outdated in each.

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:34 pm
by jacek
Think you didn't understand what I meant...

I do update the components and wizards on regular basis, but it seems that since 5.5.0 I can't do that anymore:

Operations Center in 1.1.1 installed (available update to 1.1.2)
Proxy Configuration in 1.1.3 installed (available update to 1.1.4)

When I click Install Updates it shows that it will update the above mentioned components, after applying I get the message that it is upgrading them, then that they finished, but in the end after refreshing the page the components are still in the old version and have updates available.

Looks like the UI is thinking that the update went well, but it didn't...

Re: Nagios XI 5.5.0 upgrade 5.5.1 failed

Posted: Fri Jul 13, 2018 3:39 pm
by jomann
If you force it by running the check for updates it still has the issue?

Can you also run the following to check the version inside the component's file:

Code: Select all

cat /usr/local/nagiosxi/html/includes/components/proxy/proxy.inc.php | grep VERSION
If the component file shows the wrong version too, we will have to have you tail the cmdsubsys.log file to see if there is an error when it tries to install the components.