0

CM and CD hosted in azure web apps.

We are seeing a quiet lot of exception below on both CD and CMS environments.

Note that we have a patch file which patches and we have custom rewrite rule from http to https.

<agent type="Sitecore.Tasks.UrlAgent" method="Run" interval="00:15:00">
        <param desc="url">https://mysite.azurewebsite.net/sitecore/service/keepalive.aspx</param>
        <LogActivity>true</LogActivity>
      </agent>

ERROR:

ManagedPoolThread #9 04:16:02 INFO  Scheduling.UrlAgent started. Url: https://mysite.azurewebsite.net/sitecore/service/keepalive.aspx
ManagedPoolThread #9 04:16:02 ERROR Exception in UrlAgent (url: https://mysite.azurewebsite.net/sitecore/service/keepalive.aspx)
Exception: System.Net.WebException
Message: The underlying connection was closed: An unexpected error occurred on a send.
Source: System
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadData(Uri address)
   at Sitecore.Web.WebUtil.ExecuteWebPage(String url, NameValueCollection headers)
   at Sitecore.Tasks.UrlAgent.Run()

Nested Exception

Exception: System.IO.IOException
Message: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
Source: System
   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)

Nested Exception

Exception: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
Source: System
   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)

Has anyone faced this issue and have possible solution?

8
  • 1
    Can you browse to mysite.azurewebsite.net on the server itself?
    – Thomas D
    Apr 18, 2017 at 13:01
  • Yep I can access on browser
    – Nil Pun
    Apr 18, 2017 at 19:49
  • Can you disable the SSL redirect and try it over non SSL? How old is your certificate? Maybe the certificate only supports older encryption methods. Apr 18, 2017 at 20:28
  • Works fine without https. In regards to cert. its one comes with azure web apps out of box
    – Nil Pun
    Apr 18, 2017 at 21:13
  • 1
    I don't have any experience with the hosted azure app, but since it works over non SSL it does feel like the redirect into SSL is the issue. Maybe put in an exception for the keep alive path? Apr 18, 2017 at 22:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.