SQL Monitor - Scheduled Report Email failing (404) - Test and alert emails work fine.

DaveBrownDaveBrown Posts: 3 New member
edited November 16, 2021 1:37PM in Redgate Monitor
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:

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_SmulkoGreg_Smulko Posts: 41 Silver 1
    edited November 20, 2021 9:00PM Answer ✓
    Hi, 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

  • Hi @DaveBrown,

    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

  • DaveBrownDaveBrown Posts: 3 New member
    edited November 17, 2021 8:43AM
    Hi @Kurt_M

    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 :cry:







    Any ideas what I'm doing wrong please? Thanks.

    Regards,
    Dave Brown.
  • DaveBrownDaveBrown Posts: 3 New member
    Thanks Gregg. Just had reports emailed. 
  • ArtyArty Posts: 4 New member
    edited December 20, 2021 4:58PM
    Have the same issue when using the cluster address with 12.0.11 on IIS.
Sign In or Register to comment.