Answered by:

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

Question

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.logwp!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

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.

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?

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.

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.

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.

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.

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