Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.65k stars 406 forks source link

Error in logs deleting graphs #5644

Closed sgvfr closed 9 months ago

sgvfr commented 10 months ago

Describe the bug

Using the latest develop branch of Cacti. appears to be a resurrection of https://github.com/Cacti/cacti/issues/5543

Deleting graphs from Management / Graphs results in errors in the log. no visible issues on the front end.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'Console / Management / Graphs'

  2. Selection graphs to delete'

  3. Choose delete and click the button

  4. See error in logs.

Expected behavior

no error.

2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2248]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_source_profile_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2234]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_input_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2220]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY gprint_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2208]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY color_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2196]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY vdef_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2184]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY cdef_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2172]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 'FROM data_local AS dl WHERE local_graph_id IN() GROUP BY snmp_query_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2158]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_template_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2147]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY graph_template_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2138]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY host_id' at line 1
2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2125]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 'id, COUNT(*) AS totals FROM graph_local AS gl WHERE id IN() GROUP BY host_id' at line 1
2024-01-12 14:53:18 - PHP ERROR Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[1929]:explode(), CactiErrorHandler())
2024-01-12 14:53:18 - ERROR PHP DEPRECATED: explode(): Passing null to parameter #2 ($string) of type string is deprecated in file: /var/www/html/cacti/lib/utility.php on line: 1929
2024-01-12 14:53:18 - PHP ERROR WARNING Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:CactiErrorHandler())
2024-01-12 14:53:18 - ERROR PHP WARNING: Undefined variable $local_data_ids in file: /var/www/html/cacti/lib/api_graph.php on line: 35
bmfmancini commented 10 months ago

What version of PHP What version of cacti

On Fri, Jan 12, 2024, 17:59 sgvfr @.***> wrote:

Describe the bug

Using the latest develop branch of Cacti.

Deleting graphs from Management / Graphs results in errors in the log. no visible issues on the front end. To Reproduce

Steps to reproduce the behavior:

1.

Go to 'Console / Management / Graphs' 2.

Selection graphs to delete' 3.

Choose delete and click the button 4.

See error in logs.

Expected behavior

no error.

2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2248]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_source_profile_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2234]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_input_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2220]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY gprint_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2208]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY color_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2196]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY vdef_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2184]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY cdef_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2172]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 'FROM data_local AS dl WHERE local_graph_id IN() GROUP BY snmp_query_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2158]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY data_template_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2147]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY graph_template_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2138]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 ') GROUP BY host_id' at line 1 2024-01-12 14:53:18 - SQL Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[2125]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared()) 2024-01-12 14:53:18 - CMDPHP ERROR: A DB Row 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 'id, COUNT(*) AS totals FROM graph_local AS gl WHERE id IN() GROUP BY host_id' at line 1 2024-01-12 14:53:18 - PHP ERROR Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:object_cache_get_totals(), /lib/utility.php[1929]:explode(), CactiErrorHandler()) 2024-01-12 14:53:18 - ERROR PHP DEPRECATED: explode(): Passing null to parameter #2 ($string) of type string is deprecated in file: /var/www/html/cacti/lib/utility.php on line: 1929 2024-01-12 14:53:18 - PHP ERROR WARNING Backtrace: (/graphs.php[93]:form_actions(), /graphs.php[1218]:api_delete_graphs(), /lib/api_graph.php[35]:CactiErrorHandler()) 2024-01-12 14:53:18 - ERROR PHP WARNING: Undefined variable $local_data_ids in file: /var/www/html/cacti/lib/api_graph.php on line: 35

— Reply to this email directly, view it on GitHub https://github.com/Cacti/cacti/issues/5644, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGEXTBEVYEFPHTJK677PH3YOG55JAVCNFSM6AAAAABBY2ATE2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGA3TSOBTHEZDONA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sgvfr commented 10 months ago

Latest devel from git PHP 8.1.27 (cli) (built: Dec 21 2023 20:19:54) (NTS)