Cacti / plugin_reportit

ReportIt Plugin for Cacti
GNU General Public License v2.0
7 stars 9 forks source link

Report crashes after Cacti Upgrade from 1.2.5 to 1.2.6 #87

Closed htyac closed 4 years ago

htyac commented 5 years ago

I upgraded from Cacti 1.2.5 to Cacti 1.2.6 on CentOS 7.7 via yum update. I am using ReportIt v1.1.3 plugin. Now, when running a report, the interface gets stuck (httpd uses 100% CPU) and the report crashes. Can you please help getting it back in action ?

Cacti log is full of these errors :

2019/09/23 15:15:35 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 4078700 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/23 15:15:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/23 15:15:35 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 4078698 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/23 15:15:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/23 15:15:35 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 4078696 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/23 15:15:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/23 15:15:35 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 4078694 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/23 15:15:35 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler())

netniV commented 5 years ago

In the current development version, that line suggests that it is a template it is trying to read. But the number being reported wouldn't be for a template, so can you update to the latest development version of reportit and see what the error is after that?

htyac commented 5 years ago

I just updated to the latest version of development branch of reportit. Re-enabled the plugin again. Same crash when running a report and same logs :

2019/09/24 09:48:29 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/24 09:48:29 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 581376 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/24 09:48:29 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/24 09:48:29 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 581374 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457 2019/09/24 09:48:29 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/reportit/run.php[55]:calculation(), /plugins/reportit/run.php[78]:runtime(), /plugins/reportit/runtime.php[519]:get_prepared_data(), /plugins/reportit/lib/funct_runtime.php[457]:CactiErrorHandler()) 2019/09/24 09:48:29 - ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 581372 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457

netniV commented 5 years ago

So it looks like the number of steps might not match between your datasource and the RRD. Can you run a datasource debug against the datasource used in question?

htyac commented 5 years ago

Ok, I will check that. Please note that all reports were working well before upgrading to Cacti 1.2.6, so there should not be any problem in the datasources.

htyac commented 5 years ago

Data sources are fine. I tried a test report with only one data source and I have the same behavior. The report crashes and same errors in the cacti log... Any suggestions ?

netniV commented 5 years ago

I'll give it a try myself and see what happens at the weekend if I have time.

drkrap commented 5 years ago

Hi, I came from #88 , having the same behavior I also put a in debug mode but the log message is the same.

htyac commented 4 years ago

Hello @netniV Any news on this issue ? This is a blocking point for us as we cannot use ReportIt with Cacti 1.2.6. Thank you.

netniV commented 4 years ago

ReportIT is a complicated beast and I wasn't the original author so I need to have a good few hours spare to test things out which I just have not had. Maybe @browniebraun may be able to offer a quick suggestion on the reported error.

mirghany commented 4 years ago

I'm having the same here, Any help ? Thanks for the effort ----------------------------------------- Lots of similar lines in debug ----------------------Reportit 1.1.3 ---------------- Cacti 1.2.6 ERROR PHP NOTICE in Plugin 'reportit': Undefined offset: 38890 in file: /usr/share/cacti/plugins/reportit/lib/funct_runtime.php on line: 457

htyac commented 4 years ago

Any news ? This problem is blocking for us. Any help would be very appreciated. Thank you.

htyac commented 4 years ago

FYI, Upgrading to Cacti 1.2.8 (on CentOS 7.7) solved this problem on our system.