Closed sd3m0n closed 3 years ago
You SQL Mode should only be these two:
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
You fail to mention what Cacti version you are at.
You fail to mention what Cacti version you are at.
Sorry. Fixed that.
I've changed SQL mode to the one you've mentioned above, thanx, but it wasn't the issue with this case (as expected). Do you have any idea what is wrong with the plugin or settings?
Was it working and then just stopped? If it was never working, just install and then reinstall. If you are sourcing an old *.SQL file, delete/stop that. The act of installing creates the tables. Clear log before installing, verify tables are gone, install, enable check log for errors.
I tried to reinstall (tables in DB were dropped after uninstalling the plugin) the plugin and got this after attempting clean install:
2021-02-23 15:49:43 - CMDPHP SQL Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[655]:plugin_mactrack_install(), /plugins/mactrack/setup.php[48]:mactrack_setup_table_new(), /plugins/mactrack/setup.php[217]:mactrack_setup_database(), /plugins/mactrack/includes/database.php[918]:api_plugin_db_table_create(), /lib/plugins.php[472]:db_execute(), /lib/database.php[213]:db_execute_prepared())
2021-02-23 15:49:43 - CMDPHP ERROR: A DB Exec Failed!, Error: Invalid default value for 'port_number'
2021-02-23 15:49:43 - CMDPHP SQL Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[655]:plugin_mactrack_install(), /plugins/mactrack/setup.php[48]:mactrack_setup_table_new(), /plugins/mactrack/setup.php[217]:mactrack_setup_database(), /plugins/mactrack/includes/database.php[811]:api_plugin_db_table_create(), /lib/plugins.php[472]:db_execute(), /lib/database.php[213]:db_execute_prepared())
2021-02-23 15:49:43 - CMDPHP ERROR: A DB Exec Failed!, Error: Invalid default value for 'port_number'
2021-02-23 15:49:43 - CMDPHP SQL Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[655]:plugin_mactrack_install(), /plugins/mactrack/setup.php[48]:mactrack_setup_table_new(), /plugins/mactrack/setup.php[217]:mactrack_setup_database(), /plugins/mactrack/includes/database.php[737]:api_plugin_db_table_create(), /lib/plugins.php[472]:db_execute(), /lib/database.php[213]:db_execute_prepared())
2021-02-23 15:49:43 - CMDPHP ERROR: A DB Exec Failed!, Error: Invalid default value for 'port_number'
2021-02-23 15:49:43 - CMDPHP SQL Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[655]:plugin_mactrack_install(), /plugins/mactrack/setup.php[48]:mactrack_setup_table_new(), /plugins/mactrack/setup.php[217]:mactrack_setup_database(), /plugins/mactrack/includes/database.php[494]:api_plugin_db_table_create(), /lib/plugins.php[472]:db_execute(), /lib/database.php[213]:db_execute_prepared())
2021-02-23 15:49:43 - CMDPHP ERROR: A DB Exec Failed!, Error: Invalid default value for 'port_number'
I've resolved the issue by correcting default values in the /plugins/mactrack/includes/database.php.
You should create a pull request with the changes. Help out the team.
You should create a pull request with the changes. Help out the team.
Done
Very much appreciated.
Describe the bug I have these errors when trying to run poller. Found the similar issue on the forum: cacti.mac_track_ports doesn't exist. As I understood the plugin can't create the needed tables...
MariaDB config includes the following:
And here is the Cacti log (after running
php -q poller_mactrack.php -d -sid=1
):Plugin:
Server: