Custom Reports fail to run and stay in either the "Queued" or "Defined" status.
This may happen after an upgrade if the reporter.flow_forensics_deleted table already has a row that NFA is trying to insert.
The <Install Dir>\Reporter\logs\ReportService*.log shows errors like:
15:23:20 -1 - Query:
[email protected]:3308
Duplicate entry '1' for key 'PRIMARY'
insert into flowforensicsreport_definitions_deleted select FlowForensicsReportID, FlowForensicsReportTypeID, UserID, ReportFolderID, Name, Description, StartTime, EndTime, LastExecutionStartTime, LastExecutionEndTime, LastExecutionError, NextExecutionTime, unix_timestamp() from flowforensicsreport_definitions where FlowForensicsReportID = 1;
(0.0000 ms)
at NetQoS.Data.MySqlDataComponentBase.ExecuteNonQuery(MySqlConnection connection, String sql, DataParameter[] dataParameters)
at NetQoS.Data.MySqlDataComponentBase.ExecuteNonQuery(String sql, DataParameter[] dataParameters)
at NetQoS.ReporterAnalyzer.Data.ReporterAnalyzer.FlowForensicsReportDefinitionsDc.InsertIntoDeletedTableByFlowForensicsReportId(UInt32 flowForensicsReportId)
at NetQoS.ReporterAnalyzer.Business.FlowForensicsReport.DeleteByFlowForensicsReportId(UInt32 flowForensicsReportId)
at NetQoS.ReporterAnalyzer.Business.FlowForensicsReport.DeleteStale()
at NetQoS.ReporterAnalyzer.ReportService.ReportService.timer_Elapsed(Object sender, ElapsedEventArgs e)
at System.Timers.Timer.MyTimerCallback(Object state)
at System.Threading._TimerCallback.TimerCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._TimerCallback.PerformTimerCallback(Object state)
1. RDP to the NFA Console and open a command prompt
2. Run the following to truncate the flowforensicsreport_definitions_deleted table:
mysql -P3308 -D reporter -unetqos -pnetqos -t -e "truncate flowforensicsreport_definitions_deleted;"