Cacti / plugin_mactrack

Mactrack Plugin for Cacti
GNU General Public License v2.0
12 stars 25 forks source link

Re-HUP'ping MacTrack Plugin post Maria upgrade getting the "Error: Index column size too large. The maximum column size is 767 bytes." #128

Closed chrisgsmith40 closed 4 years ago

chrisgsmith40 commented 4 years ago

Describe the bug When you re-hup MacTrack (Cacti Plugins ->Disable -> Uninstall then Install -> Enable) getting the "Error: Index column size too large. The maximum column size is 767 bytes." in the Logs view

To Reproduce See above

Plugin (please complete the following information):

So, I don't have a permanent fix (code changes), but this is what I did to get past the issue:

Disable, Uninstall Plugin Install Plugin ... then stop! (if at this point you check via System Utilities -> Tech Support -> Database, you will see all the mactrack tables have a 'Compact' Row Format; after all the package updates, this is now suppose to be 'Dynamic') So, SSH onto Cacti solution, find your way to Cacti CLIs (my Centos install was at '/usr/share/cacti/cli' Then run through the following commands to sort up each mac_track table ...

php ./convert_tables.php --innodb --table=mac_track_approved_macs --dynamic php ./convert_tables.php --innodb --table=mac_track_device_types --dynamic php ./convert_tables.php --innodb --table=mac_track_devices --dynamic php ./convert_tables.php --innodb --table=mac_track_dot1x --dynamic php ./convert_tables.php --innodb --table=mac_track_interface_graphs --dynamic php ./convert_tables.php --innodb --table=mac_track_interfaces --dynamic php ./convert_tables.php --innodb --table=mac_track_ip_ranges --dynamic php ./convert_tables.php --innodb --table=mac_track_ips --dynamic php ./convert_tables.php --innodb --table=mac_track_macauth --dynamic php ./convert_tables.php --innodb --table=mac_track_macwatch --dynamic php ./convert_tables.php --innodb --table=mac_track_oui_database --dynamic php ./convert_tables.php --innodb --table=mac_track_processes --dynamic php ./convert_tables.php --innodb --table=mac_track_scan_dates --dynamic php ./convert_tables.php --innodb --table=mac_track_scanning_functions --dynamic php ./convert_tables.php --innodb --table=mac_track_sites --dynamic php ./convert_tables.php --innodb --table=mac_track_snmp --dynamic php ./convert_tables.php --innodb --table=mac_track_snmp_items --dynamic php ./convert_tables.php --innodb --table=mac_track_temp_ports --dynamic php ./convert_tables.php --innodb --table=mac_track_vlans --dynamic

Then, back at Plugins, enable MacTrack

All good after that!

Good luck to code to writers (suspect there needs to be a test between Compact vs Dynamic now)

TheWitness commented 4 years ago

Once you upgrade to Cacti 1.2.14 and above, this problem will be solved.