Intermittent mail sending failure - net_io_connectionclosed

I am using:
SQL Server 2012 (Service Pack 2 - Business Intelligence Edition)  11.0.5058
.Net Version 4.5.1 (378675)
Windows Server 2012 R2 Standard
Exchange Server 2010 R2 (Hosted on a seperate server)

I am getting the following error in the Reporting Services log intermittently for reports:

emailextension!WindowsService_15!7cc0!10/16/2014-06:05:33:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: net_io_connectionclosed.
   at System.Net.Mail.SmtpReplyReaderFactory.ProcessRead(Byte[] buffer, Int32 offset, Int32 read, Boolean readLine)
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLines(SmtpReplyReader caller, Boolean oneLine)
   at System.Net.Mail.SmtpReplyReaderFactory.ReadLine(SmtpReplyReader caller)
   at System.Net.Mail.CheckCommand.Send(SmtpConnection conn, String& response)
   at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception)
   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_15!7cc0!10/16/2014-06:05:33:: i INFO: Notification d4b91fc4-0cc5-464a-a927-af8c24e4fcc8 completed.  Success: True, Status: Failure sending mail: Failure sending mail., DeliveryExtension: Report Server Email, Report: Missed NDD Despatch, Attempt 0


They try to send the mail via an exchange server that is hosted on a separate server, the report server email is set up as:

<Extension Name="Report Server Email" Type="Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider,ReportingServicesEmailDeliveryProvider">
                <MaxRetries>3</MaxRetries>
                <SecondsBeforeRetry>900</SecondsBeforeRetry>
                <Configuration>
                    <RSEmailDPConfiguration>
                        <SMTPServer>****.****.****</SMTPServer>
                        <SMTPServerPort>
                        </SMTPServerPort>
                        <SMTPAccountName>
                        </SMTPAccountName>
                        <SMTPConnectionTimeout>
                        </SMTPConnectionTimeout>
                        <SMTPServerPickupDirectory>
                        </SMTPServerPickupDirectory>
                        <SMTPUseSSL>
                        </SMTPUseSSL>
                        <SendUsing>2</SendUsing>
                        <SMTPAuthenticate>
                        </SMTPAuthenticate>
                        <From>****.****@****.****</From>
                        <EmbeddedRenderFormats>
                            <RenderingExtension>MHTML</RenderingExtension>
                        </EmbeddedRenderFormats>
                        <PrivilegedUserRenderFormats>
                        </PrivilegedUserRenderFormats>
                        <ExcludedRenderFormats>
                            <RenderingExtension>HTMLOWC</RenderingExtension>
                            <RenderingExtension>NULL</RenderingExtension>
                            <RenderingExtension>RGDI</RenderingExtension>
                        </ExcludedRenderFormats>
                        <SendEmailToUserAlias>True</SendEmailToUserAlias>
                        <DefaultHostName>
                        </DefaultHostName>
                        <PermittedHosts>
                        </PermittedHosts>
                    </RSEmailDPConfiguration>
                </Configuration>
            </Extension>

I have starred out some details for anonymity. I have other servers with a matching configuration file as above (although on a 2008 version of SSRS) that never have this problem.

The issue is intermittent and doesn't affect one specific report and on some occasions the retries work however quite often they don't work at all. I have had the network guys here monitor the port to see if the mail is even leaving the server and apparently the failed attempts do not register any data in wire shark. I don't believe this to be a size issue with the reports as they aren't supposed to deviate much.

Any help would be much appreciated.

Dave T

October 17th, 2014 10:13am

Hi behavedave,

According to your description, you have data-driven subscription failure randomly. Right?

In this scenario, there's nothing wrong on your subscription configuration. Since the issue happens randomly, we can hardly to figure out reason directly. Here are two articles about subscription monitoring and troubleshooting. Please refer to links below:

Monitoring and Troubleshooting Subscriptions

Troubleshooting Subscriptions: Part II, Using the Reporting Services Trace Log File

If you have any question, please feel free to ask.

Best Regards,
Simon Hou 

Free Windows Admin Tool Kit Click here and download it now
October 19th, 2014 11:30am

Hi Dave,

We stumbled onto this exact same scenario today in our test environment, and have even re-created using simple PowerShell commands (i.e. Send-MailMessage), proving that occasionally we have trouble sending the actual subscription email.  I mean we are getting the exact same error you did, about 1/2 of the time.

Did you ever resolve this?  Would be so grateful for a quick response.

Thank you!

Ryan White

September 14th, 2015 4:08pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics