8.8->1.2.2 upgrade failed running 1.1.31 step

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

Moderators: Moderators, Developers

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

8.8->1.2.2 upgrade failed running 1.1.31 step

#1 Post by LaJobe » Sun Mar 03, 2019 9:51 am

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: 2973
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#2 Post by netniV » Sun Mar 03, 2019 11:53 am

If that is occurring in the UI, it will normally highlight the step that is failing, does that happen?

netniV
Cacti Guru User
Posts: 2973
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#3 Post by netniV » Thu Mar 07, 2019 3:37 am

If you download the latest install/upgrades/1_1_34.php from github this was resolved there.

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

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#4 Post by LaJobe » Mon Mar 11, 2019 12:07 pm

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 ?


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

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#6 Post by LaJobe » Mon Mar 11, 2019 4:27 pm

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: 2973
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#7 Post by netniV » Mon Mar 11, 2019 8:06 pm

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.

dma_k
Posts: 40
Joined: Thu Aug 07, 2008 6:56 am
Contact:

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#8 Post by dma_k » Tue Mar 19, 2019 11:21 am

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: 2973
Joined: Sun Aug 27, 2017 12:05 am

Re: 8.8->1.2.2 upgrade failed running 1.1.31 step

#9 Post by netniV » Tue Mar 19, 2019 11:50 am

Up to the version you are installing. Any version beyond that should be removed before doing the upgrade so as to not cause confusion!

Post Reply