Copied to clipboard

Flag this post as spam?

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


  • athul 26 posts 117 karma points
    Jun 27, 2017 @ 12:42
    athul
    0

    Umbraco hangs - Log says "System.Net.WebException: Unable to connect to the remote server"

    My Umbraco installation get hang sometimes and When I looked into log this is what I can see

         2017-06-27 23:16:49,196 [P2344/D4/T17] ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "https://{mydomain}:443/umbraco").
    System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond {MyIp}:443
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
       --- 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()
    

    I am using Umbraco Scheduler functionality and this is how it looks.

      <scheduledTasks>
    
    <!-- add tasks that should be called with an interval (seconds) -->
        <task log="true" alias="wbshopcron" interval="10" url="https://mydomain/cronjobs"/>
        <task log="true" alias="sitemapcron" interval="1440" url="https://mydomain/sitemapcronjob"/>
    

    I am using HTTPS for my site and this is how redirects are handled inside web config

        <rewrite>
      <rules>
        <rule name="HTTP to HTTPS redirect" stopProcessing="true">
          <match url="(.*)" />
          <conditions>
            <add input="{HTTPS}" pattern="off" ignoreCase="true" />
            <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
        </rule>
        <rule name="Strip www. from URL" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="true" />
          <conditions logicalGrouping="MatchAll">
            <add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
          </conditions>
          <action type="Redirect" url="http://{C:1}/{R:1}" redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
    

    Some other redirect rules are also there inside Umbraco URlRewriting.Config

        <add name="ProductDetailedRewrite"
       virtualUrl="^~/Product/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/"
       rewriteUrlParameter="ExcludeFromClientQueryString"
       destinationUrl="~/product-detailed?mainCat=$1&amp;subCat=$2&amp;prdName=$3&amp;$4&amp;$5&amp;$6"
       redirect="Application"
       redirectMode="Permanent"
       ignoreCase="true" />
    
    <add name="seoCanonical"
         virtualUrl="http://mydomain/(.*)"
         rewriteUrlParameter="ExcludeFromClientQueryString"
         destinationUrl="http://www.mydomain/$1"
         redirect="Domain"
         redirectMode="Permanent"
         ignoreCase="true" />
    

    So can anyone please point out why this error happens Again and Again in my live system?

Please Sign in or register to post replies

Write your reply to:

Draft