Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • James 7 posts 97 karma points
    Jan 27, 2016 @ 15:42
    James
    0

    The underlying connection was closed: An unexpected error occurred on a send.

    Firstly, let me apologise for my lack of knowledge. I am reasonably new to .Net and the wonders of Umbraco.

    I have two Umbraco websites setup, one production one staging, before go live these sites were syncing with courier as expected and all was well.

    Once the production site was moved live and beyond the business firewall the syncing function has stopped working, I think it might be something to do with the SSL, but as I said .. a noob.

    Here is the error I now get:

    Application Error The underlying connection was closed: An unexpected error occurred on a send. Error details

    System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> 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 at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- 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.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) --- End of inner exception stack trace --- at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.CloseSession(String sessionKey) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose(Boolean disposing) at Umbraco.Courier.RepositoryProviders.CourierWebserviceRepositoryProvider.Dispose() at Umbraco.Courier.Core.Repository.Dispose(Boolean disposing) at Umbraco.Courier.Core.Repository.Dispose() at Umbraco.Courier.UI.Dialogs.CommitItem.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    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 at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- 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.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) An existing connection was forcibly closed by the remote host

    System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

    It is with Umbraco 7.2.1 & Courier 2.51.4

    Any thoughts or testing ideas greatly appreciated.

    Thanks

    J


    2016/04/13 Update - It looks like it might be a problem with the SSL certificate on the server that recently upgraded to TLS/SSL1.2 and therefore courier is not able to communicate with itself. Any thoughts along that process would be helpful, but I will update with any solutions.

  • David Dimmer 76 posts 134 karma points
    Jun 29, 2016 @ 22:56
    David Dimmer
    0

    We are seeing this same error on an SSL secured website:

    [P10828/D70/T24] ERROR Umbraco.Web.Scheduling.ScheduledPublishing - Failed (at "https://admin.domain.com/umbraco").
    System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed:
    
  • Alejandro 23 posts 45 karma points
    Aug 19, 2016 @ 15:46
    Alejandro
    0

    Hi,

    I'm having the same issue but with a couple of differences.

    Both staging and production servers have been working for a while and suddenly we are getting these errors (we are currently investigating for changes in our network or settings but haven't found anything yet)

    Also in our case all transfers are working correctly except for media files. I checked production and the folder seems to have the right permissions and there's plenty of room in the hard drive.

    The files we are transferring are small, well below the maxRequestLength and the site timeout settings are also generous.

    Does anyone have any idea on the issue? Thank you!

  • Simon Dingley 1171 posts 2634 karma points
    Jan 27, 2017 @ 09:46
    Simon Dingley
    0

    Did either of you manage to resolve this?

    We are seeing this regularly occurring in the log files (every 5 minutes) and believe it is something to do with the disabling of the old SSL/TLS protocols on the server. I'm currently investigating it with the host but do not yet have a solution.

  • Simon Dingley 1171 posts 2634 karma points
    Jan 31, 2017 @ 11:08
    Simon Dingley
    0

    In addition to the ScheduledPublishing exception the following is also flooding the logs with a similar exception, both I'm sure are related:

    2017-01-31 09:37:56,028 [P7044/D2/T48] ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "https://www.sitename.org.uk/umbraco").
    System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> 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
       at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
       --- End of inner exception stack trace ---
       at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
       at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
       --- End of inner exception stack trace ---
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Umbraco.Web.Scheduling.KeepAlive.<PerformRunAsync>d__4.MoveNext()
    

    At present, I am still no further forward with this.

  • Dustin 7 posts 75 karma points
    May 19, 2017 @ 15:44
    Dustin
    0

    Hello!

    Did the Courier developers simply bail on you? Did you ever get help with this?

  • Craig Mayers 79 posts 265 karma points
    May 19, 2017 @ 16:01
    Craig Mayers
    0

    This is becuase most of the API providers require TLS 1.2 nowadays

    Trying adding the below code to your Global.asax.cs:

    ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
    

    Regards

    Craig

  • Dustin 7 posts 75 karma points
    May 19, 2017 @ 16:10
    Dustin
    0

    Hi Craig,

    Thanks for lightning-fast reply! Since we do not develop our razor views in Umbraco (among other things) I only have a Global.asax to work with.

    Can the setting you list above be set in some xml .config file instead?

    Thanks again! Dustin

  • James 7 posts 97 karma points
    May 19, 2017 @ 16:58
    James
    0

    Hi Dustin & Craig,

    At the time no-one knew anything so we had to battle out what the problem was. And it is just as Craig is saying:

    <script runat="server">
            void Session_Start(object sender, EventArgs e){
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            }
    </script>

    Cheers

    J

  • Dustin 7 posts 75 karma points
    May 19, 2017 @ 17:24
    Dustin
    0

    Thank you James!

    Craig:

    I tried to add that SecurityProtocol to the Global.asax:

    <script runat="server">
    
        void Session_Start(object sender, EventArgs e)
        {           
            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
        }
    
    </script>
    

    and the error I see now is:

    System.Net.Http.HttpRequestException: An error occurred while sending the request. --->

    System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm

Please Sign in or register to post replies

Write your reply to:

Draft