Closed jdcoats closed 4 months ago
and then a pile of these probably the reason for #204
2024/02/14 15:09:43 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_scanner.php[171]:get_IOS_dot1dTpFdbEntry_ports(), /plugins/mactrack/lib/mactrack_cisco.php[483]:db_store_device_port_results(), /plugins/mactrack/lib/mactrack_functions.php[2302]:db_execute_prepared())
2024/02/14 15:09:43 - CMDPHP ERROR: A DB Exec Failed!, Error: MySQL server has gone away
2024/02/14 15:09:43 - CMDPHP SQL Backtrace: (/plugins/mactrack/mactrack_scanner.php[171]:get_IOS_dot1dTpFdbEntry_ports(), /plugins/mactrack/lib/mactrack_cisco.php[483]:db_store_device_port_results(), /plugins/mactrack/lib/mactrack_functions.php[2274]:db_check_auth(), /plugins/mactrack/lib/mactrack_functions.php[2317]:db_fetch_cell_prepared(), /lib/database.php[598]:db_execute_prepared())
2024/02/14 15:09:43 - CMDPHP ERROR: A DB Cell Failed!, Error: MySQL server has gone away
Error: MySQL server has gone away - It isn't cacti issue. check mysql server log SHOW GLOBAL VARIABLES LIKE 'max_connections'; SHOW GLOBAL STATUS LIKE 'max_used%';
Its a mactrack problem, mysql isnt really going away.
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'max_connections';
SHOW GLOBAL STATUS LIKE 'max_used%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 1000 |
+-----------------+-------+
1 row in set (0.001 sec)
+----------------------+-------+
| Variable_name | Value |
+----------------------+-------+
| Max_used_connections | 498 |
+----------------------+-------+
1 row in set (0.000 sec)
Try to change in lib/mactrack_functions.php ling 753: if ($ifOperStatus[$ifIndex] == 1) { to if (isset($ifOperStatus[$ifIndex]) && $ifOperStatus[$ifIndex] == 1) {
Do you have php 8.x?
I think we need a wrapper function to accommodate the unset variables since @
does not work like it used to. That's a fairly big project.