Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.24 -> 1.2.25 Upgrade process throws Error 500 at the end, stops. Possible DB data damage. #5482

Closed
misterjmw opened this issue Sep 6, 2023 · 56 comments
Labels
bug Undesired behaviour unverified Some days we don't have a clue

Comments

@misterjmw
Copy link

Describe the bug

Upon completion of the Upgrade process from 1.2.24 to 1.2.25., The auto-refreshing pages throws an 'Error 500' and the page quits responding.
Upon refresh, the installer does not recognize the existing install (suggests a new install) and there appears to be corruption of some sort in the DB as errors are shown indicating that CDEFs are unknown.

To Reproduce

CLI:

  • cd /tmp
  • wget cacti-latest.tar.gz
  • tar xvzf cacti-latest.tar.gz
  • cd cacti-1.2.25/
  • rm ./include/config.php
  • yes | cp -R * /usr/share/cacti
  • chown -R apache:root /usr/share/cacti

GUI:

  • browse to cacti main url
  • proceed through GPL/Install options by clicking next.
  • change nothing (performing template install does not seem to impact bug), clicking 'confirm' and "Upgrade" button to start process.
  • Auto-refreshing page scrolls through percentages, shows "Finished UPGRADE Process for v1.2.25", bar graph shows 100% then
  • Error message appears:
Sorry, we could not process your last action.
Error: 500 Internal Server Error
Reason: The response to the last action was unexpected.

The page stops responding.
Clicking Refresh; The installer restarts but does not recognize the existing Cacti installation.

If templates were imported, attempting to use the Cacti install shows various error messages that did not exist previously:
cacti-cdef-broke

If templates were not imported, cacti is mostly usable but there are odd errors in /var/log/messages:

Sep 5 12:43:29 cacti mariadbd: 2023-09-05 12:43:29 3295 [ERROR] InnoDB: Record in index `multiple_name` of table `cacti`.`graph_templates` was not found on update: TUPLE (info_bits=0, 3 fields): {[2] (0x2020),[255]Interface - Traffic (bits/sec, Total Bandwidth)
(0x496E74657266616365202D20547261666669632028626974732F7365632C20546F74616C2042616E6477696474682920202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020),
[3] (0x000020)} at: COMPACT RECORD(info_bits=0, 3 fields): {[2] (0x2020),[255]Interface - Non-Unica
Sep 5 12:43:29 cacti mariadbd: 2023-09-05 12:43:29 3295 [ERROR] InnoDB: Record in index `name` of table `cacti`.`graph_templates` was not found on update: TUPLE (info_bits=0, 2 fields): {[255]Interface - Traffic (bits/sec, Total Bandwidth)
(0x496E74657266616365202D20547261666669632028626974732F7365632C20546F74616C2042616E6477696474682920202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020),
[3] (0x000020)} at: COMPACT RECORD(info_bits=0, 2 fields): {[255]Interface - Traffic (bits/sec, 95th)
Sep 5 12:43:29 cacti mariadbd: 2023-09-05 12:43:29 0 [ERROR] InnoDB: tried to purge non-delete-marked record in index `multiple_name` of table `cacti`.`graph_templates`: tuple: TUPLE (info_bits=0, 3 fields): {[2] (0x2020),[255]Interface - Traffic (bits/sec, Total Bandwidth)
(0x496E74657266616365202D20547261666669632028626974732F7365632C20546F74616C2042616E6477696474682920202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020),
[3] (0x000020)}, record: COMPACT RECORD(info_bits=0, 3 fields): {[2] (0x2020),[255]
Sep 5 12:43:29 cacti mariadbd: 2023-09-05 12:43:29 3295 [ERROR] InnoDB: Record in index `multiple_name` of table `cacti`.`graph_templates` was not found on update: TUPLE (info_bits=0, 3 fields): {[2] (0x2020),[255]Interface - Traffic (bytes/sec, Total Bandwidth)
(0x496E74657266616365202D2054726166666963202862797465732F7365632C20546F74616C2042616E64776964746829202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020),
[3] !(0x000021)} at: COMPACT RECORD(info_bits=0, 3 fields): {[2] (0x2020),[255]Interface - Traffic (Sep 5 12:43:29 cacti mariadbd: 2023-09-05 12:43:29 3295 [ERROR] InnoDB: Record in index `name` of table `cacti`.`graph_templates` was not found on update: TUPLE (info_bits=0, 2 fields): {[255]Interface - Traffic (bytes/sec, Total Bandwidth)
(0x496E74657266616365202D2054726166666963202862797465732F7365632C20546F74616C2042616E64776964746829202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020),
[3] !(0x000021)} at: COMPACT RECORD(info_bits=0, 2 fields): {[255]Interface - Traffic (bits/sec, Total Bandwidth)

Expected behavior

Upgrade process should complete, an error should not be shown, DB data should not be corrupted/damaged.

Screenshots

This is a recording of the install process:
image

Server (please complete the following information)

  • Virtual Machine
  • OS: CentOS Linux release 7.9.2009 (Core)
  • RAM: 10GB
  • Storage: Spinning rust
  • Spline
  • Upgrading from 1.2.24 to 1.2.25 (This did not occur with 1.2.23 -> 1.2.24 update)
  • Browser: Firefox
  • PHP v8.1 & v8.2, both tested
  • MariaDB v10.5.22
  • Firefox as a browser

Snapshots of the VM were taken before/after issue so I can repeat/test easily.

Related Forum Topic: https://forums.cacti.net/viewtopic.php?t=62808

Notes

I fully expect that this is a db error somewhere/somehow. The server has several other instances of odd behavior that have/do occur. However, there are no log entries that I can find indicating what fails. Cacti's log has no entries post-update, Apache log is empty, etc.

@misterjmw misterjmw added bug Undesired behaviour unverified Some days we don't have a clue labels Sep 6, 2023
@TheWitness
Copy link
Member

If you could zip up your database backup and send it my way, it'll help with Diagnosis. I hope it's not MariaDB 10.5.22!

@TheWitness
Copy link
Member

SendTo: thewitness@cacti.net

@misterjmw
Copy link
Author

If you could zip up your database backup and send it my way, it'll help with Diagnosis. I hope it's not MariaDB 10.5.22!

I don't follow; It is "Server version: 10.5.22-MariaDB MariaDB Server"

@TheWitness
Copy link
Member

mysqldump cacti > dump_for_larry.sql 
gzip dump_for_larry.sql

Send that my way. I have to use your setup to reproduce.

@misterjmw
Copy link
Author

Send that my way. I have to use your setup to reproduce.

I Understood that portion, I just didn't follow the mariadb comment. I will export tomorrow.

@TheWitness
Copy link
Member

The reason for the MariaDB comment was that something had to have corrupted you database. So, that's the bit that I'm concerned about.

@misterjmw
Copy link
Author

The reason for the MariaDB comment was that something had to have corrupted you database. So, that's the bit that I'm concerned about.

Ah. Yes, there's something funny going on. But as it works 95% of the time, I've never been able to nail things down; It's only relating to upgrading that tables get dropped and things break. I'm not a DBA so all I can see is that it looks fine in phpMyAdmin.

I am exporting the snapshot now to perform the export; While we don't have directly sensitive information in it, are there any steps I need to take for security/sensitivity sake?

@misterjmw
Copy link
Author

I don't know how it might be related; But I'm also seeing a deluge of Thold errors at regular intervals:

2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3553]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "email_subject_restoral" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3553
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3490]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3490
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3490]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3490
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3489]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "units_suffix" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3489
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2189]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 2189
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2189]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 2189
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2188]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "units_suffix" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 2188
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3553]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "email_subject_restoral" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3553
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3490]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3490
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3490]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "decimals" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3490
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2539]:get_email_subject(), /var/lib/cacti/plugins/thold/thold_functions.php[3489]:CactiErrorHandler())
2023/09/07 18:40:57 - ERROR PHP WARNING in Plugin 'thold': Undefined array key "units_suffix" in file: /var/lib/cacti/plugins/thold/thold_functions.php on line: 3489
2023/09/07 18:40:57 - CMDPHP PHP ERROR WARNING Backtrace: (/var/lib/cacti/plugins/thold/poller_thold.php[96]:perform_thold_processes(), /var/lib/cacti/plugins/thold/poller_thold.php[139]:thold_check_all_thresholds(), /var/lib/cacti/plugins/thold/includes/polling.php[299]:thold_check_threshold(), /var/lib/cacti/plugins/thold/thold_functions.php[2189]:CactiErrorHandler())

@TheWitness
Copy link
Member

@misterjmw, that thold bug has been reported. I'll see about fixing before the morning.

@TheWitness
Copy link
Member

If you installed Thold 1.8 before Cacti 1.2.25, you are likely missing a few columns in the database.

@TheWitness
Copy link
Member

As a workaround, run this query, and then goto the Thold tab to 're-upgrade'.

UPDATE plugin_config SET version='1.7' WHERE directory='thold';

After that, in tables thold_data, and thold_template, you should find these columns:

| syslog_facility             | int(2)           | YES  |     | NULL                |                |
| syslog_enabled              | char(3)          | NO   |     |                     |                |
| data_type                   | int(12)          | NO   |     | 0                   |                |
| show_units                  | char(3)          | NO   |     |                     |                |
| units_suffix                | varchar(10)      | NO   |     |                     |                |
| decimals                    | int(11)          | NO   |     | -1                  |                |

@misterjmw
Copy link
Author

misterjmw commented Sep 8, 2023

If you installed Thold 1.8 before Cacti 1.2.25, you are likely missing a few columns in the database.

Ahh, gotcha. I 'rolled' back to 1.2.24, which probably didn't revert Thold. Good to know, and apologies for polluting the topic with a second unrelated bug.

@TheWitness
Copy link
Member

BTW, Nothing in cacti would drop those tables. So, we have a mystery on our hands...

@TheWitness
Copy link
Member

Had a hardware failure in my lab. Waiting on replacement hardware. So, there will be a delay in my analysis.

@misterjmw
Copy link
Author

misterjmw commented Sep 11, 2023

Had a hardware failure in my lab. Waiting on replacement hardware. So, there will be a delay in my analysis.

Understood. Thanks!

BTW, Nothing in cacti would drop those tables. So, we have a mystery on our hands...

I'm not trying to pollute this ticket; However, every upgrade, 1.2.20 -> 1.2.21, 1.2.21 -> 1.2.22, etc. Those tables disappeared and I had to go through the same import process. It happens every time, and it only occurs during the upgrade process. For the rest of the time, it runs fine without any issue. So, it is correlation but it's a strong one.

@TheWitness
Copy link
Member

What plugins do you have installed?

@misterjmw
Copy link
Author

something something picture worth something something

What plugins do you have installed?

image

@misterjmw
Copy link
Author

Quick Followup; There was clearly DB corruption. I can't say how, or why.
I've run optimizes on many tables just trying to make sure there aren't deeper, underlying issues moving forward.

I also am not aware of any reason why that would cause the issues being seen here; They are repeatable and consistent, always at the same steps. But I am also not a dba.

@TheWitness
Copy link
Member

Finally got my lab back and running today. Took a day off to catch up on Cacti. Needed the break.

@misterjmw
Copy link
Author

Finally got my lab back and running today. Took a day off to catch up on Cacti. Needed the break.

No worries. Take the time you need. I appreciate the support. I have not had a chance to snapshot, then reattempt the upgrade after optimizing the various DB tables.

@TheWitness
Copy link
Member

I just upgraded your schema, installed all the updated templates (not recommended on existing installs) with no issues. So, I suspect your VM/Database is causing this. PHP version was 8.0.27 (Rock9.2 default).

@TheWitness
Copy link
Member

2023/09/23 12:00:14 - INSTALL: always: Installation was started at 2023-09-23 15:59:22, completed at 2023-09-23 16:00:14
--
2023/09/23 12:00:14 - INSTALL-SYNC: always: No Remote Data Collectors found for full synchronization
2023/09/23 12:00:14 - INSTALL-SYNC: always: Found 0 poller(s) to sync
2023/09/23 12:00:14 - INSTALL: always: Finished UPGRADE Process for v1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling gexport version 1.4.2 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling weathermap version 1.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling quicktree version 2.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling webseer version 3.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling thold version 1.7 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling monitor version 2.3.6 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:13 - INSTALL: always: Mapping Automation Template for Device Template 'Cisco Router'
2023/09/23 12:00:13 - INSTALL: always: Mapping Automation Template for Device Template 'Windows Device'
2023/09/23 12:00:13 - INSTALL: always: Mapping Automation Template for Device Template 'Net-SNMP Device'
2023/09/23 12:00:13 - INSTALL: always: Repairing Automation Rules
2023/09/23 12:00:13 - INSTALL: always: Import of Package #23 'Windows_Device.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:13 - INSTALL: always: About to import Package #23 'Windows_Device.xml.gz'.
2023/09/23 12:00:13 - INSTALL: always: Import of Package #22 'Synology_NAS.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:10 - INSTALL: always: About to import Package #22 'Synology_NAS.xml.gz'.
2023/09/23 12:00:10 - INSTALL: always: Import of Package #21 'SNMP_UPS.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:09 - INSTALL: always: About to import Package #21 'SNMP_UPS.xml.gz'.
2023/09/23 12:00:09 - INSTALL: always: Import of Package #20 'SNMP_Printer.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:08 - INSTALL: always: About to import Package #20 'SNMP_Printer.xml.gz'.
2023/09/23 12:00:08 - INSTALL: always: Import of Package #19 'PING_Advanced_Ping.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:08 - INSTALL: always: About to import Package #19 'PING_Advanced_Ping.xml.gz'.
2023/09/23 12:00:08 - INSTALL: always: Import of Package #18 'NetSNMP_Device.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:05 - INSTALL: always: About to import Package #18 'NetSNMP_Device.xml.gz'.
2023/09/23 12:00:05 - INSTALL: always: Import of Package #17 'Motorola_SB6141.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:03 - INSTALL: always: About to import Package #17 'Motorola_SB6141.xml.gz'.
2023/09/23 12:00:03 - INSTALL: always: Import of Package #16 'MikroTik_Switch_SWOS.xml.gz' under Profile '1' succeeded
2023/09/23 12:00:02 - INSTALL: always: About to import Package #16 'MikroTik_Switch_SWOS.xml.gz'.
2023/09/23 12:00:02 - INSTALL: always: Import of Package #15 'MikroTik_Device.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:55 - INSTALL: always: About to import Package #15 'MikroTik_Device.xml.gz'.
2023/09/23 11:59:55 - INSTALL: always: Import of Package #14 'Local_Linux_Machine.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:54 - INSTALL: always: About to import Package #14 'Local_Linux_Machine.xml.gz'.
2023/09/23 11:59:54 - INSTALL: always: Import of Package #13 'Generic_SNMP_Device.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:54 - INSTALL: always: About to import Package #13 'Generic_SNMP_Device.xml.gz'.
2023/09/23 11:59:54 - INSTALL: always: Import of Package #12 'Fortigate.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:52 - INSTALL: always: About to import Package #12 'Fortigate.xml.gz'.
2023/09/23 11:59:52 - INSTALL: always: Import of Package #11 'ESXi_Device.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:51 - INSTALL: always: About to import Package #11 'ESXi_Device.xml.gz'.
2023/09/23 11:59:51 - INSTALL: always: Import of Package #10 'Citrix_NetScaler_VPX.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:39 - INSTALL: always: About to import Package #10 'Citrix_NetScaler_VPX.xml.gz'.
2023/09/23 11:59:39 - INSTALL: always: Import of Package #9 'Cisco_Router.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:38 - INSTALL: always: About to import Package #9 'Cisco_Router.xml.gz'.
2023/09/23 11:59:38 - INSTALL: always: Import of Package #8 'Cacti_Stats.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:37 - INSTALL: always: About to import Package #8 'Cacti_Stats.xml.gz'.
2023/09/23 11:59:37 - INSTALL: always: Import of Package #7 'BayTech_PDU.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:32 - INSTALL: always: About to import Package #7 'BayTech_PDU.xml.gz'.
2023/09/23 11:59:32 - INSTALL: always: Import of Package #6 'Aruba_Instant_AP_Cluster.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:31 - INSTALL: always: About to import Package #6 'Aruba_Instant_AP_Cluster.xml.gz'.
2023/09/23 11:59:31 - INSTALL: always: Import of Package #5 'APC_InfraStruXure_PDU.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:29 - INSTALL: always: About to import Package #5 'APC_InfraStruXure_PDU.xml.gz'.
2023/09/23 11:59:29 - INSTALL: always: Import of Package #4  'APC_InfraStruXure_InRow_CRAC.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:26 - INSTALL: always: About to import Package #4 'APC_InfraStruXure_InRow_CRAC.xml.gz'.
2023/09/23 11:59:26 - INSTALL: always: Import of Package #3 'Apache_Webserver.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:25 - INSTALL: always: About to import Package #3 'Apache_Webserver.xml.gz'.
2023/09/23 11:59:25 - INSTALL: always: Import of Package #2 'AKCP_Device.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:24 - INSTALL: always: About to import Package #2 'AKCP_Device.xml.gz'.
2023/09/23 11:59:24 - INSTALL: always: Import of Package #1 'ACME.xml.gz' under Profile '1' succeeded
2023/09/23 11:59:22 - INSTALL: always: About to import Package #1 'ACME.xml.gz'.
2023/09/23 11:59:22 - INSTALL: always: Found 23 templates to install
2023/09/23 11:59:22 - INSTALL: always: Upgrading from v1.2.24 (DB 1.2.25 (DB: 1.2.24)) to v1.2.25
2023/09/23 11:59:22 - INSTALL: always: NOTE: Using temporary file for db cache: /tmp/cduvjKWu4
2023/09/23 11:59:22 - INSTALL: always: Switched from  to /tmp/cduvjKWu4
2023/09/23 11:59:22 - INSTALL: always: No tables where found or selected for conversion
2023/09/23 11:59:22 - INSTALL: always: Starting UPGRADE Process for v1.2.25
2023/09/23 11:59:22 - INSTALL: always: Setting PHP Option memory_limit = -1
2023/09/23 11:59:22 - INSTALL: always: Setting PHP Option max_execution_time = 0
2023/09/23 11:59:22 - INSTALL: Checking arguments
2023/09/23 11:59:22 - INSTALL: always: Spawning background process:  /usr/bin/php '/var/www/html/cacti/install/background.php'  1695484762.3372

@TheWitness
Copy link
Member

This is likely due to me not having these installed:

2023/09/23 12:00:14 - CMDPHP Disabling gexport version 1.4.2 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling weathermap version 1.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling quicktree version 2.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling webseer version 3.0 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling thold version 1.7 as it is not compatible with Cacti 1.2.25
2023/09/23 12:00:14 - CMDPHP Disabling monitor version 2.3.6 as it is not compatible with Cacti 1.2.25

@TheWitness
Copy link
Member

I think that's a bug too...

@TheWitness
Copy link
Member

With regard to your upgrade issues, it might have something to do with your Weathermap. Maybe you should upgrade to the Cacti version of it.

@misterjmw
Copy link
Author

With regard to your upgrade issues, it might have something to do with your Weathermap. Maybe you should upgrade to the Cacti version of it.

Is that integrated (like realtime is now)?
I am using the version from https://github.com/Cacti/plugin_weathermap

@TheWitness
Copy link
Member

That's the right one, but the plugin table had the wrong data. Have to fix that.

@misterjmw
Copy link
Author

misterjmw commented Sep 26, 2023

Going to close this one for now. If the next attempt fails, we can re-open if the next attempt fails.

@TheWitness Unfortunately my most recent attempt is just as borked as when I opened this ticket.

500 Error is always at the same spot, always right at or right after 100%.
This time around; A CDEF I built was zeroed and the user_auth_groups disappeared.

Here's a gif of the whole thing (GH being GH, Remember to hit the play button or else it'll stay on that first frame):
cacti-upgrade-1-2-3-fail

I rolled back to 1.2.24 again, I couldn't confirm that nothing further was damaged.

@misterjmw
Copy link
Author

This just happened in my roll-back of 1.2.24, this has only happened after my 1.2.2.5 upgrade then roll back;
CDEF's are corrupting as I edit them?

Cacti-CDEF-What

@TheWitness
Copy link
Member

Please try it without importing the packages.

@TheWitness TheWitness reopened this Sep 27, 2023
@misterjmw
Copy link
Author

Please try it without importing the packages.
As requested.

Same 500 after 'completion', same permissions issues afterwards:

Cacti- 25-upgrade-fail-no-import

I haven't seen a smoking gun in the logs, but the debug logging necessary is deeper digging than I normally have to go.
Does mysql have command logging? I can nail this down to a window of a few seconds. Maybe that would get us the information needed?

@TheWitness
Copy link
Member

Do you want to do a zoom on Thursday?

@misterjmw
Copy link
Author

misterjmw commented Sep 28, 2023

Do you want to do a zoom on Thursday?

I'll shoot you an email. There's a possibility of that working, but I have a very mixed schedule.

@misterjmw
Copy link
Author

Do you want to do a zoom on Thursday?

Tried to catch you for a zoom call today, doesn't seem to have worked out.
Let me know when you have availability and I can demo it live.

@TheWitness
Copy link
Member

I totally missed this. Was a busy day at the office. Are you awake?

@TheWitness
Copy link
Member

Working with @misterjmw, we were able to fix some corruption in his database, but it's still a mystery as to how the User Group tables are being removed.

@TheWitness
Copy link
Member

I think I found the issue. Did you have the User Group plugin installed at one point in time?

SELECT * FROM plugin_db_changes WHERE table LIKE '%user%';

If you find your tables there, node the plugin and then go through the following tables and remove any rows you find.

plugin_config;
plugin_realms;
plugin_db_changes;
plugin_hooks;

@TheWitness
Copy link
Member

I think I wrote a user group plugin years ago and totally forgot about it.

@misterjmw
Copy link
Author

I think I found the issue. Did you have the User Group plugin installed at one point in time?

I honestly do not recall; It's been a long time since I spun it up, lots of iterations. I'll dig through SQL and look.

@TheWitness
Copy link
Member

Confirmed. You need to delete the ugroup directory.

image

@misterjmw
Copy link
Author

@TheWitness One last thing; I was going to open the feature request for the sql colors work we did, but I wasn't sure exactly how to phrase what we did. Suggestions?

@TheWitness
Copy link
Member

How about Cacti colors table repair fails when duplicate color hex values exist in colors table due to missing primary key.

@netniV
Copy link
Member

netniV commented Nov 17, 2023

Was that color issue opened?

@misterjmw
Copy link
Author

Was that color issue opened?

It had not, I have barely had a chance to get back to cacti other than to write my last forum post. Just fell off the urgency list.

@TheWitness
Copy link
Member

Let me address that one. Not sure how far we have to go back to resolve though.

@TheWitness
Copy link
Member

Fixed here: #5581

@misterjmw
Copy link
Author

@TheWitness Afternoon, I know you wanted to loop back to this if the next upgrade still had issues; I just upgraded to 1.2.26 and the issue still occurs. I get a 500 error, auth tables go poof and I have to push them back in (via my sql) to make auth work properly.

@TheWitness TheWitness reopened this Jan 28, 2024
@TheWitness
Copy link
Member

Re-opened. I'll be working on Cacti on Sunday too. Watching stuff on Rumble now.

@misterjmw
Copy link
Author

@TheWitness
One more addition, things that go weird during the upgrade. Perhaps this help narrow down where the problem is;
Some RPN's get blown away or damaged during the upgrade:

E.g. here's a graph that breaks because the CDEF for a 24hr trend is zero'd out.

Initial graph (used to work):
cacti-blow-up-rpn

Looking at CDEFs being used:
cacti-blow-up-unifi-rss-graph

CDEF for 24h Trend:
cacti-blow-up-rpn-cdef-empty

@TheWitness
Copy link
Member

My brain.....

@TheWitness
Copy link
Member

@misterjmw, I'm going to close this one. Reach out to me at thewitness at cacti dot net and we can do a conference call. It may have to be the week of 2/26. I'm off tomorrow and on the Left coast the rest of the week.

@misterjmw
Copy link
Author

@misterjmw, I'm going to close this one. Reach out to me at thewitness at cacti dot net and we can do a conference call. It may have to be the week of 2/26. I'm off tomorrow and on the Left coast the rest of the week.

Sure thing, thanks again.

@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour unverified Some days we don't have a clue
Projects
None yet
Development

No branches or pull requests

3 participants