Upgrade from 5.4.7 to 5.4.12 failure

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Upgrade from 5.4.7 to 5.4.12 failure

Post by BanditBBS »

Code: Select all

Archive:  sourceguardian/ixed4.lin.x86-64.zip
  inflating: /usr/lib64/php/modules/ixed.5.3.lin
Sourceguardian extension found for PHP version 5.3
Sourceguardian extension already in php.ini
Stopping httpd:                                            [  OK  ]
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using iss-chi-nag05.net.itciss.com for ServerName
                                                           [  OK  ]
Checking required prereqs...
Please wait...

OLD VERSION: 5407
Loaded plugins: product-id, refresh-packagekit, rhnplugin, search-disabled-
              : repos, security, subscription-manager
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Package perl-Test-Simple-0.92-144.el6.x86_64 already installed and latest version
Package perl-Class-Accessor-0.31-6.1.el6.noarch already installed and latest version
Package perl-Params-Validate-0.92-3.el6.x86_64 already installed and latest version
Package perl-Config-Tiny-2.12-7.1.el6.noarch already installed and latest version
Package perl-Math-Calc-Units-1.07-6.el6.noarch already installed and latest version
Package perl-Number-Format-1.73-3.el6.noarch already installed and latest version
Nothing to do
Saving old crontab to /tmp/nagios.crontab.orig...
Removing XI cron jobs...
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...
Copying over new XI directory...
chown: cannot access `/usr/local/nagios/share/pnp/templates': No such file or directory
So I opened the nagios page and it shows 5.4.12, but the upgrade sure didn't complete.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by tmcdonald »

Reproducing now on Cent 6 and 7. Will keep you posted. Likely you could just comment out the offending line in the upgrade script, but I'll see if I can pinpoint it (assuming I can replicate this).
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by BanditBBS »

Looks like this is the offending section:

Code: Select all

## 2011R1.8 FIXES (PATCHES EARLIER RELEASES)
if [ "$oldversion" -le 208 ]; then

        # Set PNP template directory perms
        chown -R .$nagiosgroup /usr/local/nagios/share/pnp
        chmod g+ws /usr/local/nagios/share/pnp/templates
        chmod g+ws /usr/local/nagios/share/pnp/templates.dist

        # Reload apache to apply perms
        service $httpd reload

fi
But my old version is definitely not less than 208. Think I should just comment it?

Also, why don't I have pnp folders if they should be there?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by tmcdonald »

Direct upgrade from fresh 5.4.7 to 5.4.12 did not reproduce the error, but your system very likely is older than that.

You probably can comment that out, no idea why it would think the value was less - that's the proper way to compare integers in bash as far as I know.

Regarding the directories being gone, that's also a mystery. Nothing in living memory would have removed those, at least not intentionally. We don't really use them as much since moving to Highcharts for graphing, so assuming you are not going back to the old-style graphs any time soon you can probably just make those files and directories to satisfy this and future upgrades.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by BanditBBS »

I created the folder/files and now get this at same spot:

Code: Select all

Copying over new XI directory...
chown: cannot access `/usr/local/nagios/share/pnp/templates/*.php': Not a directory
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by tmcdonald »

touch /usr/local/nagios/share/pnp/templates/nagiospleasejustupdate.php

Edit: Not a joke, I mean literally run this. chown is erroring because there are no PHP files for it to modify. Adding one should fix it.
Former Nagios employee
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by BanditBBS »

Looks like I'm good Trevor.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Upgrade from 5.4.7 to 5.4.12 failure

Post by dwhitfield »

It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Locked