How can we help you today? How can we help you today?

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

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.
DaveBrown
0

Comments

5 comments

  • Kurt_M
    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.
    Kurt_M
    0
  • DaveBrown
    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.
    DaveBrown
    0
  • Greg_Smulko
    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
    0
  • DaveBrown
    Thanks Gregg. Just had reports emailed.
    DaveBrown
    0
  • Arty
    Have the same issue when using the cluster address with 12.0.11 on IIS.
    Arty
    0

Add comment

Please sign in to leave a comment.