none
Failure sending mail: The transport lost its connection to the server.

    Question

  • Hi,

    I'm having trouble with the reporting services sending subscriptions. I have 7 running every morning, 2 ran and all the other crashed with the "Failure sending mail: The transport lost its connection to the server. " error. They were all working before and no settings on the exchange server was changed.

    The reporting services server seems to be able to reach the exchange server but no data is sent. Is it a timeout issue? I tried putting no report timeout but it still doesn't work.

    Here are the logs:

    ReportServerService__12_08_2008_10_26_52.log:
    ReportingServicesService!emailextension!d!12/08/2008-10:42:16:: Error sending email. System.Runtime.InteropServices.COMException (0x80040212): The transport lost its connection to the server.

    ReportServerWebApp__12_08_2008_09_23_47.log
    wp!ui!1!12/8/2008-10:41:25:: e ERROR: The underlying connection was closed: An unexpected error occurred on a receive.
    w3wp!ui!1!12/8/2008-10:41:25:: e ERROR: HTTP status code --> 500
    -------Details--------
    System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

    On the exchange server log:
    Server ip omitted - Server name omitted [08/Dec/2008:10:50:14 -0500] "HELO -? Server name omitted SMTP" 250 62
    Server ip omitted - Server name omitted [08/Dec/2008:10:50:14 -0500] "MAIL -? FROM: Email@com SMTP" 250 48
    Server ip omitted - Server name omitted [08/Dec/2008:10:50:53 -0500] "RCPT -? TO: Email@com SMTP" 250 0
    Server ip omitted - Server name omitted [08/Dec/2008:10:50:53 -0500] "QUIT -?Server name omitted SMTP" 240 83

    Thank you for any help

    Monday, December 08, 2008 6:11 PM

Answers

  •  I had the same issue happen to me two weeks ago. All I did was to reboot the exchange server and the email work. The only minor issue I ran into was that all reports that was looking for the exchange server had to be deleted and rescheduled. For some reason, the subscription to those reports was corrupt due to the missing exchange server.
    • Marked as answer by ddnguyen Wednesday, March 25, 2009 5:23 PM
    Monday, December 29, 2008 5:20 PM

All replies

  • Reporting Service gets this error from system CDO.dll (Collaboration Data Objects) thru which RS communicates with SMTP server. The error is CDO_E_CONNECTION_DROPPED (0x80040212).

    The following links discuss same problem, and it looks like it occurs when size of the report exceeds some threshold. Though strange it stopped working without a reason. Could it be that some size-related setting changed on SMTP Server?

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=398713&SiteID=1

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3789717&SiteID=1&pageid=0

     

    Thanks,

    Igor

     

    Tuesday, December 09, 2008 6:22 PM
    Answerer
  • We have learned a few on the problem but it is still occuring.

    • If we reset the IIS and smtp service on exchange server, it may work, not all the time.
    • If two emails from reporting services try to send at the same time, it crashes.
    • Then each subsequent emails (I have 5 sending every day) will fail with Failure sending mail: The transport lost its connection to the server.
    • Normal emailing (from outlook) work fine.
    • I do not think it is a size problem as the reports are between 50-100k.
    • Following this: http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599, it describes it as a timeout issue.
    • Looking at SMTP logs, they seem to cut off the connection after 30 seconds...How do you fix this?

    Thanks for your help

     

     

     

    Wednesday, December 10, 2008 6:41 PM
  • The link you gave describes HTTP connectivity problems with .NET1.1 - it's not related to this issue.

     

    This looks like CDO<-->SMTP Server communication problem manifesting itself when many emails are sent at the same time. Below are some links discussing same problem with CDO regardless of Reporting Services. Two of those links report that they found a root cause as SMTP Relay Filter was blocking some email addresses. Like this reply: 

     

    "We solved the issue. It turns out our Open Relay Filter was blocking any mail sent to an address outside of our domain."

     

    What might be happening is that SMTP Server drops connection to CDO client when encounters forbidden email address. If more emails are transmitted via same connection, they get this error.

     

    Here are links that I mentioned:

     

    http://www.webmasterkb.com/Uwe/Forum.aspx/vbscript/6038/CDO-Message-1-error-8004021

    http://forums.quadrahosting.com.au/showthread.php?t=172

    http://www.google.com/search?hl=en&fkt=7302&fsdt=12953&q="The+transport+lost+its+connection+to+the+server"+CDO&btnG=Google+Search&aq=f&oq=&aqi=

     

    Thanks,

    Igor

      
    Wednesday, December 10, 2008 9:22 PM
    Answerer
  • All the adresses are inside our domain. I do not think it is a relay issue.

    I tried just one email and it still doesn't work.

    The problem can't be with the reports because they can be saved to file (web archive) with no problems.

    It's strange because we have automated emails being sent out with access vba using the same exchange server and it runs without issue. It makes me believe the problem is with reporting services. What frustrates me is that sometimes it works, most of the time it fails.

    If it works, why can't it work everytime?
    • Proposed as answer by Florida_guy Monday, December 10, 2012 5:35 PM
    Friday, December 12, 2008 2:34 PM
  • Thanks for your help Igor, Much appreciated.
    Friday, December 12, 2008 2:34 PM
  • Hi,

     

    Based on your description, I would like to suggest that you could test your mail function in a simple environment. If it works fine, then you can change the configuration to live environment. From logs you posted, I suspect that it also could be a network issue, please temporary close both side firewall for test.

     

    Hope this helps.


    Garsy Liang - MSFT
    Thursday, December 25, 2008 9:54 AM
  •  I had the same issue happen to me two weeks ago. All I did was to reboot the exchange server and the email work. The only minor issue I ran into was that all reports that was looking for the exchange server had to be deleted and rescheduled. For some reason, the subscription to those reports was corrupt due to the missing exchange server.
    • Marked as answer by ddnguyen Wednesday, March 25, 2009 5:23 PM
    Monday, December 29, 2008 5:20 PM
  • Just revisiting, rebooting was the answer, I thought we did, but after a second reboot, it worked fine.
    Wednesday, March 25, 2009 5:24 PM
  • Just got off the phone with Microsoft Premier Exchange support with the same issue.  The solution was to modify the EdgeTransport.exe.config file in C:\Program Files\Microsoft\Exchange Server\Bin on both of our Hub Transport servers (Exchange 2007 SP1).  I changed the settings to the following values on each HUB server and then restarted the Transport service...

        <add key="VersionBucketsHighThreshold" value="300" />
        <add key="VersionBucketsMediumThreshold" value="180" />
        <add key="VersionBucketsNormalThreshold" value="120" />

    The values were previously lower from the RTM release of Exchange 2007.  SP1 was supposed to increase the values automatically, but it didn't.  Hope this helps!
    Monday, June 01, 2009 3:43 PM