SQL Monitor - Scheduled Report Email failing (404) - Test and alert emails work fine.
DaveBrown
Posts: 3 New member
Hi All,
Wondering if anyone can assist with this. In SQL Monitor, sending test emails and alert based emails all work fine. However for scheduled reports, they don't send and the log entry is always:
Unsure what to check to fix this. I did add the entry for ignoreSSLErrors to [settings].[KeyValuePairs] but it doesn't sppear to have helped. Any suggestions for articles, Redgate forum posts, stack overflow etc on how to go about diagnosing and fixing the issue?
Many thanks for reading! (Edit - looked weird when Code Formatted so removed)
Dave Brown.
Wondering if anyone can assist with this. In SQL Monitor, sending test emails and alert based emails all work fine. However for scheduled reports, they don't send and the log entry is always:
2021-11-16 13:25:27,008 [ 46] ERROR RedGate.SqlMonitor.UI.Website.BackgroundTasks.ReportBackgroundTask - Error downloading report pdf for e-mail
System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at RedGate.SqlMonitor.UI.Website.BackgroundTasks.ReportBackgroundTask.DownloadReportPdf(Uri uri, Boolean ignoreSslErrors, ReportToGenerate reportToGenerate)
at RedGate.SqlMonitor.UI.Website.BackgroundTasks.ReportBackgroundTask.Poll()
Inner exception:
System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at System.Net.Http.HttpClient.GetByteArrayAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
End of inner exception:
Unsure what to check to fix this. I did add the entry for ignoreSSLErrors to [settings].[KeyValuePairs] but it doesn't sppear to have helped. Any suggestions for articles, Redgate forum posts, stack overflow etc on how to go about diagnosing and fixing the issue?
Many thanks for reading! (Edit - looked weird when Code Formatted so removed)
Dave Brown.
Tagged:
Best Answer
-
Greg_Smulko Posts: 41 Silver 1Hi, it looks like a regression that we introduced in v. 12.0, sorry about that!
For now, a workaround is to remove the trailing slash in the URL settings (so in your case it should be just "http://waverton-01-srv05:8080").Greg Smulko | Technical Architect for SQL Monitor | Redgate Software
Answers
Can you check the "URL settings" entry at the bottom of the Configuration > Notification settings is correct?
This is what is used by the scheduled reports to download the report. The 404 error usually means the URL on the notification settings page is wrong.
Kind regards,
Kurt McCormick
Product Support Engineer, Redgate
Need help? Take a look at our Help Center
Thanks for the reply. I've attached screen shots of the URL for the main overview page and the two URLs I've tried in that setting. Still getting 404 errors in the log.
When I receive ALERT emails, clicking the links in those works fine and takes me to the correct area of SQL monitor. Just can't seem to get a Scheduled Report working at all
Any ideas what I'm doing wrong please? Thanks.
Regards,
Dave Brown.