An unexpected error occurred on a send

Tim Wayne asked on October 19, 2015 03:42

Hi All, I've inherited a site in two separate staging and production Kentico v6.0.39 sp1 installs that i'm tasked to move from Win2008R2 to a new Win2012 server. I've copied the DBs, and sites completely and adjusted the web.configs. Everything is working except Content Staging.

It's the Content Staging that is throwing the errors in the Event log of the Staging instance:

    Event code: RUNTASK


Description:    Message: The underlying connection was closed: An unexpected error occurred on a send. 
Stack Trace: 
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at Microsoft.Web.Services3.WebServicesClientProtocol.GetResponse(WebRequest request, IAsyncResult result)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at CMS.Synchronization.CMS.SynchronizationEngine.SyncServerWse.ProcessSynchronizationTask(String taskTitle, String taskType, String taskObjectType, String taskData, String taskBinaryData, String taskServerList, String systemVersion)
at CMS.Synchronization.SyncClient.RunTask(TaskInfo taskObj)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, 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.ConnectStream.WriteHeaders(Boolean async)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

AND

Event code: SYNCSELECTEDDOC
Description:    Synchronization client error: Exception occurred: The underlying connection was closed: An unexpected error occurred on a send.
Synchronizing 'Update document' task 

Can anyone suggest what might be going wrong here please?

I also receive an error when i "Check the server availability" on the staging server when i check the target server status using https. Although it works and the status is "OK" when i use http. So i'm guessing that it's an https/SSL config issue but i can't tell what exactly is wrong :(

The SSL is valid and was exported from the Win2008R2 instance.

I can browse to the sync server url: https://www.mykentico.com/CMSPages/syncserver.asmx on the new Win2012 server. I'm stuck for ideas. Any help would be appreciated!

Thankyou

Recent Answers


Brenden Kehren answered on October 19, 2015 15:26 (last edited on October 20, 2015 01:37)

If its a protocol issue, then use HTTPS over HTTP and it should work. There is also a web.config key (CMSAcceptAllCertificates) that will accept all certificate errors.

0 votesVote for this answer Mark as a Correct answer

Tim Wayne answered on October 20, 2015 00:28

@Brenden

I added that config key (CMSAcceptAllCertificates) to my web.config but it didn't make a difference unfortunately.

I'm thinking now it's an IIS config issue as the Kentico installs are the same as what is working on the original Win2008 server. I know that it's not Kentico anymore once the problem becomes an IIS issue but can you think of anything config setting that would prevent HTTPS content staging?

Thanks Again

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 20, 2015 01:39

So have you tried the test with https vs. http? Are there communication/network issues between server 1 and server 2? IIS config is pretty simple and shouldn't be that different from IIS v7 or v7.5 to v8.5.

0 votesVote for this answer Mark as a Correct answer

Tim Wayne answered on October 20, 2015 02:17 (last edited on October 20, 2015 02:38)

Yes it syncs fine over HTTP between stage and prod on the new Win2012 server. Both sites are on this server so it's not a network issue.

I've even tested sync from the staging site on the new Win2012 server back to the prod on the old Win2008 server over HTTPS and that works fine.

So it's def an IIS8/SSL config issue on the new server but I just can't work it out.

Do you have any idea what the exception is?

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 20, 2015 14:59

The exception is a pretty generic error. You might check the event logs on the server to see if it provides more information.

I know I'm going out on a limb here but if you're trying to go from your old prod server (server 2008) to your new prod or staging server(s) (server 2012), it could very well be a network issue or some sort of connectivity issue. Are you working in a DMZ? Are you working behind a load balancer or in a web farm?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.