首页 > 解决方案 > SSRS 订阅按计划失败,但手动运行时成功

问题描述

我订阅了 SSRS。订阅配置为使用计划每天发送一次电子邮件。当计划触发订阅时,它每次都会失败并显示错误消息“发送邮件失败:发生一个或多个错误。邮件将不会被重新发送。” 如果我通过 GUI 手动触发订阅,它会成功发送报告。我检查了 SMTP 重播服务器和 SSRS 服务器的日志文件。这似乎是 EHLO 响应错误,但对于邮件服务器,我们需要一些帮助。任何人都知道为什么它会在手动触发时成功发送,但在计划触发时不会发送?

SSRS 日志:

library!WindowsService_9!1ccc!03/18/2021-10:02:09::i 信息:将 EnableExecutionLogging 初始化为“True”,如服务器系统属性中所指定。emailextension!WindowsService_9!1ccc!03/18/2021-10:02:09:: e 错误:发送电子邮件时出错。异常:System.AggregateException:发生一个或多个错误。---> System.Net.Mail.SmtpException:服务器返回了对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果) --- 内部结束异常堆栈跟踪 --- 在 System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 在 System.Threading.Tasks.Task.Wait(Int32 毫秒超时,CancellationToken cancelToken) at System.Threading.Tasks.Task.Wait(TimeSpan timeout) at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification) ---> (Inner Exception #0) System.Net.Mail.SmtpException: The服务器返回对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。Threading.Tasks.Task.Wait(TimeSpan timeout) at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification) ---> (Inner Exception #0) System.Net.Mail.SmtpException: 服务器返回一个无效响应EHLO 命令。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。Threading.Tasks.Task.Wait(TimeSpan timeout) at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification) ---> (Inner Exception #0) System.Net.Mail.SmtpException: 服务器返回一个无效响应EHLO 命令。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。EmailDeliveryProvider.EmailProvider.Deliver(Notification notification) ---> (Inner Exception #0) System.Net.Mail.SmtpException: 服务器返回了对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。EmailDeliveryProvider.EmailProvider.Deliver(Notification notification) ---> (Inner Exception #0) System.Net.Mail.SmtpException: 服务器返回了对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。服务器返回对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。服务器返回对 EHLO 命令的无效响应。在 System.Net.Mail.SmtpConnection.ConnectAndHandshakeAsyncResult.End(IAsyncResult 结果) 在 System.Net.Mail.SmtpTransport.EndGetConnection(IAsyncResult 结果) 在 System.Net.Mail.SmtpClient.ConnectCallback(IAsyncResult 结果)<--- 。附加信息:SmtpException StatusCode:GeneralFailure notification!WindowsService_9!1ccc!03/18/2021-10:02:09::e 错误:处理订阅时出错 5967a3e8-a345-4820-8b39-04822178da98:发送邮件失败:一个或多个发生错误。邮件将不会被重新发送。

SMTP 服务器日志:(目前只能找到日志条目)

21 年 3 月 18 日 10:02:09 SMTP-IN 04C7099C25B2418DA334A1B8E8247384.MAI 788 192.xxx.xxx.xxx 220 mydomain.com ESMTP MailEnable 服务,版本:10.32- 准备于 03/18/21 10:02:09 94 0

标签: ssrs-subscriptionmailenable

解决方案


推荐阅读