8.8->1.2.2 upgrade failed running 1.1.31 step

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
LaJobe
Posts: 3
Joined: Sun Mar 03, 2019 9:44 am

8.8->1.2.2 upgrade failed running 1.1.31 step

Post by LaJobe »

Hi,
I'm moving an old cacti server to a brand new one freshly installed.

Last step was upgrading the data… It went OK until 1.1.31>1.1.34 upgrade where I received a fatal error :

Code: Select all

2019/03/03 14:40:41 - INSTALL: always: Upgrading from v1.1.28 (DB 1.1.28) to v1.1.31
2019/03/03 14:41:02 - INSTALL: always: Upgrading from v1.1.31 (DB 1.1.31) to v1.1.34
2019/03/03 14:42:02 - CMDPHP ERROR: A DB Exec Failed!, Error: Can't DROP 'PRIMARY'; check that column/key exists
2019/03/03 14:42:02 - CMDPHP SQL Backtrace:  (/install/background.php[52]:Installer::beginInstall(), /lib/installer.php[3145]:Installer->install(), /lib/installer.php[2686]:Installer->upgradeDatabase(), /lib/installer.php[3044]:upgrade_to_1_1_34(), /install/upgrades/1_1_34.php[247]:db_install_execute(), /install/functions.php[119]:db_execute_prepared())
2019/03/03 14:42:03 - INSTALL: always: Finished UPGRADE Process for v1.2.2
2019/03/03 14:42:04 - INSTALL: always: WARNING: One or more upgrades failed to install correctly
I then tried to run the upgrade database script in CLI, as well as all the appropriate upgrades .php scripts, but my installer is still stuck with the same error
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by netniV »

If that is occurring in the UI, it will normally highlight the step that is failing, does that happen?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by netniV »

If you download the latest install/upgrades/1_1_34.php from github this was resolved there.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
LaJobe
Posts: 3
Joined: Sun Mar 03, 2019 9:44 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by LaJobe »

Thanks for your Help netnivf :)

I've downloaded the updated 1_1_34.php file, but I'm still stuck with the message : "Error Your Cacti Server v1.2.2 has been installed/updated with errors" when loading http://———/install/install.php page.

I tryed to launch http://———/install/upgrades/1_1_34.php directly (from a browser and in command line) but I only get a blank page or no CLI answer.

What would you suggest to run the skipped steps of my broken upgrade ?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by netniV »

What version does the DB say it is?

Code: Select all

SELECT * FROM version
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
LaJobe
Posts: 3
Joined: Sun Mar 03, 2019 9:44 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by LaJobe »

It said 1.2.2

I changed it to > 1.1.31

I ran > php cli/upgrade_database.php

It's back to 1.2.2

When loading http://———/install/install.php, I get :

Cacti Server v1.2.2 - Installation Wizard
Error
Your Cacti Server v1.2.2 has been installed/updated with errors

Process Log
--- NO LOG FOUND ---
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by netniV »

Do this then, download the latest 1_1_34.php file and run the following SQL:

Code: Select all

update version set cacti = '1.1.3';
delete from settings where name like 'install_%';
Then do the upgrade step again.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
dma_k
Posts: 47
Joined: Thu Aug 07, 2008 6:56 am
Contact:

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by dma_k »

netniV wrote:Download the latest 1_1_34.php file and run the following SQL:

Code: Select all

update version set cacti = '1.1.3';
delete from settings where name like 'install_%';
Then do the upgrade step again.
Thanks! This advice helped me. I was concerned about comment in issue#2521 mentioning problems in other upgrade scripts. Does it make sense (as general advice) to download / update all install/upgrades/*.php scripts?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

Post by netniV »

Up to the version you are installing. Any version beyond that should be removed before doing the upgrade so as to not cause confusion!
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests