简体   繁体   English

更改为 O365 邮件服务器后 SSRS 报告订阅错误

[英]SSRS Report subscription error after change to O365 mail server

We have a subscription which sends out a mail to each consultant with their planning of the coming weeks.我们有一个订阅,它会向每位顾问发送一封邮件,其中包含他们未来几周的计划。 Two weeks ago we've changed from an on-prem mail server to an O365 mail server.两周前,我们已经从本地邮件服务器更改为 O365 邮件服务器。 Since this change I have noticed that some consultants are not receiving their mail as they should.由于这一变化,我注意到一些顾问没有收到他们应该收到的邮件。 This got me looking at the RS logs and two weeks ago I had 6 people who didn't receive their email and last week it is 9. I checked the data for any typos in their mail addresses but everything was good, since I didn't change this part of the setup (and this worked normally when we still had the on-prem mail server).这让我查看了 RS 日志,两周前我有 6 个人没有收到他们的 email,而上周是 9。我检查了他们邮件地址中的任何拼写错误的数据,但一切都很好,因为我没有t 更改这部分设置(当我们仍然拥有本地邮件服务器时,这可以正常工作)。

    notification!WindowsService_1!24f8!03/26/2021-16:00:13:: i INFO: Notification 84547a5f-930f-45e6-8085-0e738664c590 completed.  Success: True, Status: Mail sent to a********.d******@*******.com, DeliveryExtension: Report Server Email, Report: OPS Individual Planning For Subscription, Attempt 0
emailextension!WindowsService_1!1a38!03/26/2021-16:00:13:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
   at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Mail.SmtpConnection.Flush()
   at System.Net.Mail.ReadLinesCommand.Send(SmtpConnection conn)
   at System.Net.Mail.EHelloCommand.Send(SmtpConnection conn, String domain)
   at System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
   at System.Net.Mail.SmtpClient.GetConnection()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- End of inner exception stack trace ---
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
notification!WindowsService_1!1a38!03/26/2021-16:00:13:: e ERROR: Error occurred processing subscription 4ee16cfe-5e77-4da9-8433-d62a99d11ea2: Failure sending mail: Failure sending mail.

On the first line you can see a succesfull operation, but after that you can see a failure.在第一行你可以看到一个成功的操作,但之后你可以看到一个失败。 "Authentication failed because the remote party has closed the transport stream" As of last week we are also running CU15 for SQL Server 2016 SP2. “身份验证失败,因为远程方已关闭传输流”截至上周,我们还在为 SQL Server 2016 SP2 运行 CU15。

From what I find on the web is that it's TLS related, but I have checked this and 1.2 is checked in our case.从我在 web 上找到的内容来看,它与 TLS 相关,但我已经检查了这一点,并且在我们的案例中检查了 1.2。 Also I would find it a bit weird if it would be TLS since this is a browser setting and the subscription is managed by SQL server itself.此外,如果它是 TLS,我会觉得有点奇怪,因为这是一个浏览器设置,并且订阅由 SQL 服务器本身管理。

If anyone has a solution for this please let me know!如果有人对此有解决方案,请告诉我!

Kind regards, Kevin亲切的问候,凯文

I'm having the same issue and the same error message.我有同样的问题和同样的错误信息。 As per the comments, I was also confused as to why some emails were failing but not others.根据评论,我也很困惑为什么有些电子邮件失败了,而其他的却没有。

this article explains why: 这篇文章解释了原因:

Starting in September 2021, we will reject a small percentage of connections that use TLS1.0 for SMTP AUTH.从 2021 年 9 月开始,我们将拒绝一小部分使用 TLS1.0 进行 SMTP AUTH 的连接。 Clients should retry as with any other temporary errors that can occur during submission.客户端应与提交期间可能发生的任何其他临时错误一样重试。 Over time we will increase the percentage of rejected connections, causing delays in sending that more and more customers should notice随着时间的推移,我们将增加拒绝连接的百分比,从而导致发送延迟,越来越多的客户应该注意到这一点

Are you sure TLS 1.2 is set?您确定已设置 TLS 1.2 吗?

I can confirm, per my comment on SEarle1986's answer, that following Microsoft's guide on enable TLS 1.2 fixed my issue with my SSRS server.根据我对 SEarle1986 的回答的评论,我可以确认,遵循 Microsoft 关于启用 TLS 1.2 的指南解决了我的 SSRS 服务器问题。

I verified the server where my SSRS instance (not the database*) was installed only had .NET Framework version 4.5 and I had pending Windows updates to bring it up to 4.8.我验证了安装了我的 SSRS 实例(不是数据库*)的服务器只有 .NET 框架版本 4.5,并且我有待处理的 Windows 更新以将其升级到 4.8。

I also had to follow the Configure for strong cryptography section and add the recommended registry keys to my server.我还必须遵循配置强加密部分并将推荐的注册表项添加到我的服务器。 After these two things and a restart of the server, all my SSRS subscription emails were working again.在完成这两件事并重新启动服务器之后,我所有的 SSRS 订阅电子邮件都恢复了工作。

Because it was an intermittent issue, and some of the emails went out, I was able to look at the header on one of the emails before the fix and confirm it was using TLS 1.0.因为这是一个间歇性问题,并且一些电子邮件已发送出去,所以我能够在修复之前查看其中一封电子邮件上的 header 并确认它使用的是 TLS 1.0。 After the fix, all emails for my subscriptions had TLS 1.2 in the header.修复后,我订阅的所有电子邮件在 header 中都有 TLS 1.2。

Kevin, did you ever get this resolved?凯文,你有没有解决这个问题? I just started having the same issue all of a sudden.我突然开始遇到同样的问题。 SQL Server and SSRS 2019...exact same error as you. SQL 服务器和 SSRS 2019 ...与您完全相同的错误。 Only happens intermittently, not with every report, and eventually some of the failed ones do get delivered.只是间歇性地发生,而不是每个报告都发生,最终一些失败的报告确实会交付。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM