Cacti / plugin_flowview

FlowView Plugin for Cacti
GNU General Public License v2.0
18 stars 10 forks source link

Upgrade to the latest dev version, give some error on the DB #182

Closed arno-st closed 3 months ago

arno-st commented 3 months ago

I just upgrade from a month old of Flowview (I don't know the exact version), and I got many error: The update of the file was done with : git clone -b develop https://github.com/Cacti/plugin_flowview.git /bin/mkdir -p flowview && /bin/cp -rpf plugin_flowview/* flowview /bin/rm -rf plugin_flowview cp config.php flowview/config.php chown -R apache:apache flowview

then with the php flowview_upgrade.php --forcever=3.3

29/07/2024 14:51:10 - FLOWVIEW Flowview Database Upgrade Complete

29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[532]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENGINE=Aria' at line 1 29/07/2024 14:51:10 - FLOWVIEW Altering Table plugin_flowview_raw_2024203 Using this alter ADD INDEX template_id (template_id), ADD INDEX start_time (start_time) ENGINE=Aria. 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[532]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENGINE=Aria' at line 1 29/07/2024 14:51:10 - FLOWVIEW Altering Table plugin_flowview_raw_2024204 Using this alter ADD INDEX template_id (template_id), ADD INDEX start_time (start_time) ENGINE=Aria. 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[532]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENGINE=Aria' at line 1 29/07/2024 14:51:10 - FLOWVIEW Altering Table plugin_flowview_raw_2024205 Using this alter ADD INDEX template_id (template_id), ADD INDEX start_time (start_time) ENGINE=Aria. 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[532]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENGINE=Aria' at line 1 29/07/2024 14:51:10 - FLOWVIEW Altering Table plugin_flowview_raw_2024206 Using this alter ADD INDEX template_id (template_id), ADD INDEX start_time (start_time) ENGINE=Aria. 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[532]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ENGINE=Aria' at line 1 29/07/2024 14:51:10 - FLOWVIEW Altering Table plugin_flowview_raw_2024210 Using this alter ADD INDEX template_id (template_id), ADD INDEX start_time (start_time) ENGINE=Aria. 29/07/2024 14:51:10 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[459]:include_once(), /plugins/flowview/flowview_upgrade.php[459]:CactiErrorHandler()) 29/07/2024 14:51:10 - ERROR PHP WARNING in Plugin 'flowview': include_once(): Failed opening '/plugins/flowview/irr_tables.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in file: /usr/share/cacti/plugins/flowview/flowview_upgrade.php on line: 459 29/07/2024 14:51:10 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[459]:include_once(), /plugins/flowview/flowview_upgrade.php[459]:CactiErrorHandler()) 29/07/2024 14:51:10 - ERROR PHP WARNING in Plugin 'flowview': include_once(/plugins/flowview/irr_tables.php): Failed to open stream: No such file or directory in file: /usr/share/cacti/plugins/flowview/flowview_upgrade.php on line: 459 29/07/2024 14:51:10 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[459]:CactiErrorHandler()) 29/07/2024 14:51:10 - ERROR PHP WARNING in Plugin 'flowview': Trying to access array offset on value of type null in file: /usr/share/cacti/plugins/flowview/flowview_upgrade.php on line: 459 29/07/2024 14:51:10 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[459]:CactiErrorHandler()) 29/07/2024 14:51:10 - ERROR PHP WARNING in Plugin 'flowview': Undefined variable $config in file: /usr/share/cacti/plugins/flowview/flowview_upgrade.php on line: 459 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[455]:flowview_db_column_exists(), /plugins/flowview/database.php[357]:db_column_exists(), /lib/database.php[1124]:db_fetch_cell(), /lib/database.php[576]:db_fetch_cell_prepared(), /lib/database.php[598]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'flow_test.plugin_flowview_irr_route' doesn't exist 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[429]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned NOT NULL DEFAULT '', map_partition varchar(20) NOT NULL DEFAULT ''...' at line 1 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[424]:flowview_db_column_exists(), /plugins/flowview/database.php[357]:db_column_exists(), /lib/database.php[1124]:db_fetch_cell(), /lib/database.php[576]:db_fetch_cell_prepared(), /lib/database.php[598]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'flow_test.parallel_database_query_shard' doesn't exist 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[412]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate column name 'cached_shards' 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[407]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate column name 'md5sum_tables' 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[401]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: Duplicate column name 'map_range' 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[384]:flowview_db_execute(), /plugins/flowview/database.php[70]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'unsigned NOT NULL DEFAULT '', map_partition varchar(20) NOT NULL DEFAULT ''...' at line 1 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[246]:db_execute(), /lib/database.php[385]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Exec Failed!, Error: Table 'reports_queued' already exists 29/07/2024 14:51:10 - CMDPHP SQL Backtrace: (/plugins/flowview/flowview_upgrade.php[98]:flowview_upgrade(), /plugins/flowview/flowview_upgrade.php[220]:db_column_exists(), /lib/database.php[1124]:db_fetch_cell(), /lib/database.php[576]:db_fetch_cell_prepared(), /lib/database.php[598]:db_execute_prepared()) 29/07/2024 14:51:10 - CMDPHP ERROR: A DB Cell Failed!, Error: Table 'cacti_test.sent_by' doesn't exist 29/07/2024 14:51:10 - FLOWVIEW Updating template_id column to plugin_flowview_queries table to signed. 29/07/2024 14:51:10 - FLOWVIEW Upgrading from v3.3 to 4.4

TheWitness commented 3 months ago

What version of MySQL or MariaDB are you using? Run this command as super:

SHOW ENGINES;

Some of the errors are due to the fact that you had a previous installation. I'll work though these in the next days. Tonight and tomorrow, I have some evening appointments. So, it'll likely take a few days.

TheWitness commented 3 months ago

Oops, according to Wikipedia, I see the following:

Aria is not shipped with MySQL or Percona Server
arno-st commented 3 months ago

it should be ok: MariaDB [(none)]> show engines; +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | Engine | Support | Comment | Transactions | XA | Savepoints | +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ | CSV | YES | Stores tables as CSV files | NO | NO | NO | | MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO | | Aria | YES | Crash-safe tables with MyISAM heritage. Used for internal temporary tables and privilege tables | NO | NO | NO | | MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO | | SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES | | InnoDB | DEFAULT | Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES | | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | +--------------------+---------+-------------------------------------------------------------------------------------------------+--------------+------+------------+ 8 rows in set (0.000 sec)

TheWitness commented 3 months ago

Okay, good. I made this commit just in case: https://github.com/Cacti/plugin_flowview/commit/8ac31a902100ded61b0773c53d9f4d6d8e254ec7

Off to the day job.

TheWitness commented 3 months ago

Should be resolved now. Bumped the version to 4.5. Close once confirmed.

TheWitness commented 3 months ago

I'm going to close, post a new bug if there are additional issues.