Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jun 26, 2019 7:17 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Sun Mar 03, 2019 9:51 am 
Offline

Joined: Sun Mar 03, 2019 9:44 am
Posts: 3
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:
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


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Sun Mar 03, 2019 11:53 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
If that is occurring in the UI, it will normally highlight the step that is failing, does that happen?

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Thu Mar 07, 2019 3:37 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
If you download the latest install/upgrades/1_1_34.php from github this was resolved there.

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Mon Mar 11, 2019 12:07 pm 
Offline

Joined: Sun Mar 03, 2019 9:44 am
Posts: 3
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 ?


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Mon Mar 11, 2019 3:53 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
What version does the DB say it is?
Code:
SELECT * FROM version

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Mon Mar 11, 2019 4:27 pm 
Offline

Joined: Sun Mar 03, 2019 9:44 am
Posts: 3
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 ---


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Mon Mar 11, 2019 8:06 pm 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
Do this then, download the latest 1_1_34.php file and run the following SQL:

Code:
update version set cacti = '1.1.3';
delete from settings where name like 'install_%';


Then do the upgrade step again.

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Tue Mar 19, 2019 11:21 am 
Offline

Joined: Thu Aug 07, 2008 6:56 am
Posts: 40
netniV wrote:
Download the latest 1_1_34.php file and run the following SQL:
Code:
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?


Top
 Profile  
 
 Post subject: Re: 8.8->1.2.2 upgrade failed running 1.1.31 step
PostPosted: Tue Mar 19, 2019 11:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2523
Up to the version you are installing. Any version beyond that should be removed before doing the upgrade so as to not cause confusion!

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group