Page 1 of 1

Need some help with upgrade to 5

Posted: Tue Oct 20, 2015 11:54 am
by jwelch
I did an upgrade on my production server and it looked ok, but said the update failed.
I started another, but then found that if I checked for updates in another window it said it was up to date.
Rather than going through another backup/update, I killed the process, rebooted, and did a manual
upgrade. The XI GUI *looks* ok, but the new update is available' is still showing and if I click on it now,
it looks like it's in the middle of an upgrade, but I don't think it's doing anything. What do I need to clean up?

Re: Need some help with upgrade to 5

Posted: Tue Oct 20, 2015 12:34 pm
by jwelch
I went ahead and did a restore to get back to 2014r2.7, but in case I run into this the next
time I try an upgrade, I'd still like to know how to clean up a partial upgrade. (was still
in the create backup stage).

Re: Need some help with upgrade to 5

Posted: Tue Oct 20, 2015 4:42 pm
by ssax
You should be able to Admin > Check for Updates and click the Check for Updates Now button and it should have refreshed that, did you try that?

Re: Need some help with upgrade to 5

Posted: Tue Oct 20, 2015 4:44 pm
by tmcdonald
It most likely succeeded the first time you did it from the web interface. We've had several reports of XI 5 taking up to 24 hours to show as "No new updates" after the initial upgrade.

Re: Need some help with upgrade to 5

Posted: Tue Oct 20, 2015 5:08 pm
by jwelch
The upgrade completed, but said it failed.
Yes, going to the check for updates screen kept giving me 'update in progress' screen
with some lines (file <blah> skipped for one reason or another). It went away
after I restored my 2014R2.7 backup.

BTW, is it intentional that the upgrade backup does not have a timestamp?
It seems wrong, since trying an update more than once overwrites the previous
upgrade_backup..tar.gz file.

-rw-r--r-- 1 nagios nagios 2130758832 Oct 20 11:39 autoupgrade_backup..tar.gz

Re: Need some help with upgrade to 5

Posted: Wed Oct 21, 2015 11:10 am
by lmiltchev
We had a bug, where a "bogus" message was displayed after an upgrade, stating that the upgrade failed even though completed successfully. The bug has been fixed in Nagios XI 5.2.0. If you see such a message after an upgrade, try clearing browser's cache. This should fix the issue.
You are correct about the "autoupgrade_backup..tar.gz" being overwritten. I am not sure why this is done - I am waiting for a word from our developers on this.

Re: Need some help with upgrade to 5

Posted: Thu Oct 22, 2015 4:04 pm
by jwelch
Thanks for the update. I've missed my window for changes so it will be some time before I can try again.
BTW, I ran into a couple of problems with the check_email_delivery plugin. The command only had
$ARG1$ assigned, but I was using several parameters spread across the available ARGs so I could
easily see/modify them. After fixing that, I think the upgrade installed newer perl modules, so when
the check ran, it complained about SSL_verify_mode no longer defaulting to SSL_VERIFY_NONE
and caused the check to fail with a return code of 20 (I think). Due to some religious war in the Perl
community, there didn't seem to be an easy fix that could be put into the check_email_delivery script,
but I was able to add a fix to check_imap_receive:

Code: Select all

    118         if( $ssl ) {
    119                 $imap_port = $default_imap_ssl_port unless $imap_port;         
    120                 IO::Socket::SSL::set_ctx_defaults(                       #<---Added
    121                         SSL_verify_mode => 0,                            #<---Added
    122                 );                                                       #<---Added
    123                 my $socket = IO::Socket::SSL->new(
    124                         "$imap_server:$imap_port",
    125                 );
    126                 die IO::Socket::SSL::errstr() unless $socket;
    127                 $socket->autoflush(1);
On the upgrade_backup..tar.gz file, I suspect there should be a timestamp variable between the dots.
Probably a typo in the variable name so an empty variable was used instead of the intended one.

Re: Need some help with upgrade to 5

Posted: Thu Oct 22, 2015 4:44 pm
by lmiltchev
Due to some religious war in the Perl
community, there didn't seem to be an easy fix that could be put into the check_email_delivery script,
but I was able to add a fix to check_imap_receive
Thanks for sharing!
On the upgrade_backup..tar.gz file, I suspect there should be a timestamp variable between the dots.
Probably a typo in the variable name so an empty variable was used instead of the intended one.
You are correct. The timestamp wasn't getting set but this will be fixed in the newer versions.