Page 3 of 4

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Thu Oct 31, 2019 9:45 am
by ppalmer
Hi Scott,

Please see attached.

Regards,

Paul

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Thu Oct 31, 2019 9:58 am
by scottwilkerson
Hmm, something is causing a DB connection error, can you PM me you profile.zip from
Admin -> System profile

Thanks

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Thu Oct 31, 2019 10:49 am
by scottwilkerson
Can I have you try the following, edit line 41 of you /usr/local/nagiosxi/html/config.inc.php
from this

Code: Select all

"dbserver" => '',
to this

Code: Select all

"dbserver" => 'localhost',
And then try the following again

Code: Select all

cd /tmp/rpms/nagiosxi/
yum reinstall nagiosxi-5.6.7-1.el6.x86_64.rpm
If it still fails, please send the contets of the following command

Code: Select all

tail -50 /var/lib/mysql/logs/mysqld.log

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Thu Oct 31, 2019 12:27 pm
by ppalmer
Hi Scott,

We tried that, here are the outputs of the log. I see there is still a reference to lost and found in the database.

tail -50 /var/lib/mysql/logs/mysqld.log
191030 10:41:52 InnoDB: Started; log sequence number 0 107694970
191030 10:41:52 [Note] Event Scheduler: Loaded 0 events
191030 10:41:52 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
191030 14:59:17 [Note] /usr/libexec/mysqld: Normal shutdown

191030 14:59:17 [Note] Event Scheduler: Purging the queue. 0 events
191030 14:59:19 InnoDB: Starting shutdown...
191030 14:59:22 InnoDB: Shutdown completed; log sequence number 0 107803364
191030 14:59:22 [Note] /usr/libexec/mysqld: Shutdown complete

191030 14:59:22 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
191030 15:12:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
191030 15:12:04 InnoDB: Initializing buffer pool, size = 8.0M
191030 15:12:04 InnoDB: Completed initialization of buffer pool
191030 15:12:04 InnoDB: Started; log sequence number 0 107803364
191030 15:12:04 [Note] Event Scheduler: Loaded 0 events
191030 15:12:04 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
191031 7:00:01 [ERROR] Invalid (old?) table or database name 'lost+found'
191031 10:30:21 [Note] /usr/libexec/mysqld: Normal shutdown

191031 10:30:21 [Note] Event Scheduler: Purging the queue. 0 events
191031 10:30:23 InnoDB: Starting shutdown...
191031 10:30:25 InnoDB: Shutdown completed; log sequence number 0 108277580
191031 10:30:25 [Note] /usr/libexec/mysqld: Shutdown complete

191031 10:30:25 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
191031 10:34:13 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
191031 10:34:13 InnoDB: Initializing buffer pool, size = 8.0M
191031 10:34:13 InnoDB: Completed initialization of buffer pool
191031 10:34:13 InnoDB: Started; log sequence number 0 108277580
191031 10:34:13 [Note] Event Scheduler: Loaded 0 events
191031 10:34:13 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
191031 16:12:58 [Note] /usr/libexec/mysqld: Normal shutdown

191031 16:12:58 [Note] Event Scheduler: Purging the queue. 0 events
191031 16:13:00 InnoDB: Starting shutdown...
191031 16:13:02 InnoDB: Shutdown completed; log sequence number 0 108417877
191031 16:13:02 [Note] /usr/libexec/mysqld: Shutdown complete

191031 16:13:02 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
191031 16:18:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
191031 16:18:37 InnoDB: Initializing buffer pool, size = 8.0M
191031 16:18:37 InnoDB: Completed initialization of buffer pool
191031 16:18:37 InnoDB: Started; log sequence number 0 108417877
191031 16:18:37 [Note] Event Scheduler: Loaded 0 events
191031 16:18:37 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.73' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
[nagios@smpnagios-kn-t100 ~]$

Thanks.

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Thu Oct 31, 2019 12:31 pm
by scottwilkerson
I am seeing a bunch of gaps in the logs between shutdowns and startups.

You are leaving the mysql service running while you are doing the reinstall correct?

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Fri Nov 01, 2019 4:14 am
by ppalmer
I am shutting down the Nagios service, I am not stopping anything else.

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Fri Nov 01, 2019 12:09 pm
by ssax
What is the output of this command?

Code: Select all

rpm -qa | grep nagiosxi

Please do this:

Download this file to your /tmp directory of your XI server:

Code: Select all

https://repo.nagios.com/nagiosxi-offline/nagiosxi-5.6.7-1.el6.x86_64.tar.gz
Then as root, run these commands on your XI server:

Code: Select all

cd /tmp
rm -rf nagiosxi
tar zxf nagiosxi-5.6.7-1.el6.x86_64.tar.gz
mv nagiosxi nag
cd nag
rpm2cpio nagiosxi-5.6.7-1.el6.x86_64.tar.gz | cpio -idmv
cd tmp/nagiosxi
./rpmupgrade
Then send us the full output of all the commands.

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Mon Nov 04, 2019 9:01 am
by ppalmer
Hi,

Firstly this is the output of the first command.

rpm -qa | grep nagiosxi
nagiosxi-nsca-5.6.7-1.el6.x86_64
nagiosxi-nxti-5.6.7-1.el6.x86_64
nagiosxi-nagiosplugins-5.6.7-1.el6.x86_64
nagiosxi-wmic-5.6.7-1.el6.x86_64
nagiosxi-ndoutils-5.6.7-1.el6.x86_64
nagiosxi-wkhtmltox-5.6.7-1.el6.x86_64
nagiosxi-mrtg-5.6.7-1.el6.x86_64
nagiosxi-nagvis-5.6.7-1.el6.x86_64
nagiosxi-nrpe-5.6.7-1.el6.x86_64
nagiosxi-nagioscore-5.6.7-1.el6.x86_64
nagiosxi-shellinabox-5.6.7-1.el6.x86_64
nagiosxi-nagiosmobile-5.6.7-1.el6.x86_64
nagiosxi-nrds-5.6.7-1.el6.x86_64
nagiosxi-pnp-5.6.7-1.el6.x86_64
nagiosxi-5.6.7-1.el6.x86_64

Then my colleague downloaded the file, placed it in the /tpm directory and ran the other commands, it then failed at this point.

rpm2cpio nagiosxi-5.6.7-1.el6.x86_64.tar.gz | cpio -idmv with the error message argument is not an RPM package
cpio: premature end of archive

Does that help?

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Mon Nov 04, 2019 3:41 pm
by ssax
Sorry, my fault, do this instead:

Download this file to your /tmp directory of your XI server:

Code: Select all

https://repo.nagios.com/nagiosxi-offline/nagiosxi-5.6.7-1.el6.x86_64.tar.gz
Then as root, run these commands on your XI server:

Code: Select all

cd /tmp
rm -rf nagiosxi
tar zxf nagiosxi-5.6.7-1.el6.x86_64.tar.gz
mv nagiosxi nag
cd nag
rpm2cpio nagiosxi-5.6.7-1.el6.x86_64.rpm | cpio -idmv
cd tmp/nagiosxi
./rpmupgrade

Re: failed upgrade again. 5.5.11 to 5.6.7

Posted: Tue Nov 05, 2019 6:23 am
by ppalmer
Hi,

My colleague ran the commands and this is what came back, it looks like there is still a problem with the database.

root@smpnagios-kn-t100 # ./rpmupgrade
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: [ OK ]
PHP Fatal error: Uncaught exception 'Exception' with message 'A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.' in /tmp/nag/tmp/nagiosxi/nagiosxi/basedir/html/includes/db.inc.php:321
Stack trace:
#0 /tmp/nag/tmp/nagiosxi/verify-prereqs.php(0): db_connect('nagiosxi')
#1 /tmp/nag/tmp/nagiosxi/verify-prereqs.php(2): sg_load('52C4625F2EA3770...')
#2 {main}
thrown in /tmp/nag/tmp/nagiosxi/nagiosxi/basedir/html/includes/db.inc.php on line 321
root@smpnagios-kn-t100 #

My colleague isn't sure about the instructions above to repair the error, is this correct?

Regards,

Paul