Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Moderators: Developers, Moderators
Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Hello
In an attempt to upgrade from version 0.8.8.h to version 1.2.26 the install just loops. (we stayed on v0.8.8h because queries to F5 devices failed when polled with spine)
Following this issue posted in this forum:
I've made the changes suggested in the README to the my.cnf file and restarted mysqld (but this was only done after the install failed).
mysql -e "use cacti; select cacti from version" -p
Enter password:
+-------+
| cacti |
+-------+
| 1.0.4 |
+-------+
php -q upgrade_database.php --forcever=1.0.4
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.4
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
++++++x++++++
################################
[Fail] - DB Exec Failed!, Error 8: Array to string conversion
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 'Array' WHERE data_source_profile_id = 0
We've never updated graphs on a one minute interval.
If someone can tell me exactly what steps I need to take to get past this, it would be greatly appreciated.
Thanks!
In an attempt to upgrade from version 0.8.8.h to version 1.2.26 the install just loops. (we stayed on v0.8.8h because queries to F5 devices failed when polled with spine)
Following this issue posted in this forum:
I've made the changes suggested in the README to the my.cnf file and restarted mysqld (but this was only done after the install failed).
mysql -e "use cacti; select cacti from version" -p
Enter password:
+-------+
| cacti |
+-------+
| 1.0.4 |
+-------+
php -q upgrade_database.php --forcever=1.0.4
NOTE: Repairing Tables for Local Database
Upgrading from v1.0.4
Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
++++++x++++++
################################
[Fail] - DB Exec Failed!, Error 8: Array to string conversion
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 'Array' WHERE data_source_profile_id = 0
We've never updated graphs on a one minute interval.
If someone can tell me exactly what steps I need to take to get past this, it would be greatly appreciated.
Thanks!
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
it seems that it was fixed. Use fie 1_0_5.php from
https://github.com/Cacti/cacti/tree/1.2 ... l/upgrades
https://github.com/Cacti/cacti/tree/1.2 ... l/upgrades
Let the Cacti grow!
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
thanks macon - I downloaded the file and ran diff against it and the file in cacti/install/upgrades and they look almost identical:
upgrades]$ diff 1_0_5.php /home/user/1_0_5.php
4c4
< | Copyright (C) 2004-2023 The Cacti Group |
---
> | Copyright (C) 2004-2024 The Cacti Group |
upgrades]$ diff 1_0_5.php /home/user/1_0_5.php
4c4
< | Copyright (C) 2004-2023 The Cacti Group |
---
> | Copyright (C) 2004-2024 The Cacti Group |
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Thanks macan - I had read over those previously.
Tried to upgrade again, this time after making the changes to my.cnf in the README file, running the table conversion script and restarting mysqld.
Still getting this error:
php upgrade_database.php --forcever=0.8.8h
NOTE: Repairing Tables for Local Database
Upgrading from v0.8.8h
Upgrading from v0.8.8h (DB 0.8.8h) to v1.0.0
Upgrading from v1.0.0 (DB 1.0.0) to v1.0.4
-Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
++++++x+++++++++
################################
[Fail] - DB Exec Failed!, Error 8: Array to string conversion
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 'Array' WHERE data_source_profile_id = 0
################################
It seems to me that this bug still exists in v1.2.26. At least in my case:
PHP 7.2.24 (cli)
Server version: 10.11.7-MariaDB MariaDB Server
I'm going to try upgrading to 1.2.23 as an interim step and see if that will work.
Thanks for looking at it.
Tried to upgrade again, this time after making the changes to my.cnf in the README file, running the table conversion script and restarting mysqld.
Still getting this error:
php upgrade_database.php --forcever=0.8.8h
NOTE: Repairing Tables for Local Database
Upgrading from v0.8.8h
Upgrading from v0.8.8h (DB 0.8.8h) to v1.0.0
Upgrading from v1.0.0 (DB 1.0.0) to v1.0.4
-Upgrading from v1.0.4 (DB 1.0.4) to v1.0.5
++++++x+++++++++
################################
[Fail] - DB Exec Failed!, Error 8: Array to string conversion
+------------------------------+
UPDATE data_template_data SET data_source_profile_id = 'Array' WHERE data_source_profile_id = 0
################################
It seems to me that this bug still exists in v1.2.26. At least in my case:
PHP 7.2.24 (cli)
Server version: 10.11.7-MariaDB MariaDB Server
I'm going to try upgrading to 1.2.23 as an interim step and see if that will work.
Thanks for looking at it.
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Edit that file and see if the profile_id fetch is as follows:
Code: Select all
$profile_id = db_install_fetch_cell('SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1');
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Thanks TheWitness.
From /apps/local/cacti-1.2.26/install/upgrades/1_0_5.php:
/* bad data source profile id's */
$profile_id = db_install_fetch_cell('SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1');
if ($profile_id > 0) {
db_install_execute('UPDATE data_template_data
SET data_source_profile_id = ?
WHERE data_source_profile_id = 0',
array($profile_id));
}
MariaDB [cacti]> SELECT id, name, step, heartbeat, x_files_factor, 'default' FROM data_source_profiles;
+----+-------------------+------+-----------+----------------+---------+
| id | name | step | heartbeat | x_files_factor | default |
+----+-------------------+------+-----------+----------------+---------+
| 1 | Upgrade Profile 1 | 300 | 600 | 0.5 | default |
+----+-------------------+------+-----------+----------------+---------+
1 row in set (0.001 sec)
From /apps/local/cacti-1.2.26/install/upgrades/1_0_5.php:
/* bad data source profile id's */
$profile_id = db_install_fetch_cell('SELECT id FROM data_source_profiles ORDER BY `default` DESC LIMIT 1');
if ($profile_id > 0) {
db_install_execute('UPDATE data_template_data
SET data_source_profile_id = ?
WHERE data_source_profile_id = 0',
array($profile_id));
}
MariaDB [cacti]> SELECT id, name, step, heartbeat, x_files_factor, 'default' FROM data_source_profiles;
+----+-------------------+------+-----------+----------------+---------+
| id | name | step | heartbeat | x_files_factor | default |
+----+-------------------+------+-----------+----------------+---------+
| 1 | Upgrade Profile 1 | 300 | 600 | 0.5 | default |
+----+-------------------+------+-----------+----------------+---------+
1 row in set (0.001 sec)
- TheWitness
- Developer
- Posts: 17047
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Just comment out those lines and let the upgrade continue.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Attempted upgrade from 0.8.8h to 1.2.26 fails at version 1.0.4
Commenting out those statements worked & upgrade was successful. Hoorah!
Thanks TheWitness
Thanks TheWitness
Who is online
Users browsing this forum: No registered users and 3 guests