Copied to clipboard

Flag this post as spam?

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


  • Arlan Galvez 44 posts 175 karma points
    Jun 11, 2018 @ 20:02
    Arlan Galvez
    1

    ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "https://localhost/umbraco")

    Hello, I'm getting this issue too frequent on my Umbraco logs but I cannot find the real issue. This error repeats every 5 min (as you can see on the code). I'm working with Umbraco 7.6.3 hosted on a scaled out Azure Web App. I have custom UrlRewrites on my web.config

    <rule name="Enforce https" enabled="true" stopProcessing="true">
          <match url="(.*)" />
          <conditions logicalGrouping="MatchAll">
            <add input="{HTTPS}" pattern="off" />
            <add input="{HTTP_HOST}" matchType="Pattern" pattern="^localhost*" negate="true" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        </rule>
    

    Can this rewrites screw the schedule publish of umbraco? This are the errors:

    2018-06-09 14:36:22,195 [P4232/D2/T108] ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "https://localhost/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: An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1: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()
     2018-06-09 14:41:22,211 [P4232/D2/T40] ERROR Umbraco.Web.Scheduling.KeepAlive - Failed (at "https://localhost/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: An attempt was made to access a socket in a way forbidden by its access permissions 127.0.0.1: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()
    
  • Andy Felton 141 posts 410 karma points c-trib
    Jun 12, 2018 @ 07:17
    Andy Felton
    102

    Hi Arlan,

    Yes this can be an issue. Umbraco works be determining the connection it can use to communicate server side. Looking at your error message the URL it's trying to connect to is https://localhost/umbraco which is suspect you can't connect to from the server.

    Can you check if umbracoUseSSL is set to true in the web.config as this may help. If you still have trouble after this you can hardcode the server side URL by setting umbracoApplicationUrl="http://localhost/umbraco" in config/umbracoSettings.config.

    Hope that helps. Andy

  • Arlan Galvez 44 posts 175 karma points
    Jun 12, 2018 @ 14:38
    Arlan Galvez
    0

    Hello Andy, Thank you for your answer. I have umbracoUseSSL on true at the moment I post the issue. I will try with the umbracoApplicationUrl="https://localhost/umbraco" but I have a question here: Do I need to use http or https on the url?

  • Andy Felton 141 posts 410 karma points c-trib
    Jun 12, 2018 @ 14:49
    Andy Felton
    1

    Hi Arlan,

    I would try it without the https.

    Thanks Andy

  • Nadine Fisch 153 posts 400 karma points
    Oct 04, 2018 @ 07:58
    Nadine Fisch
    0

    Hi,

    I get the same error, but the proposed solution by setting umbracoApplicationUrl="http://localhost/umbraco" in config/umbracoSettings.config doesn't work for me. The error still appears every 2 minutes.

    We are working with Umbraco 7.5.4 assembly: 1.0.6136.27241

    Best regards, Nadine

  • Nadine Fisch 153 posts 400 karma points
    Oct 04, 2018 @ 08:31
    Nadine Fisch
    1

    I changed localhost to the sitename. Now it seems to be away.

  • Eric Schrepel 150 posts 203 karma points
    Jun 26, 2019 @ 18:52
    Eric Schrepel
    0

    On our Umbraco 8 site, I've tried the above (changing the web.routing line in umbracoSettings so that the umbracoApplicationUrl="https://ourwebsitename/umbraco"), but still getting the keepalive errors every 5 minutes. I also read it could be a TLS thing but we have TLS 1.0 and 1.1 turned off on our Windows 10 server. I've read about adding this line somewhere, not sure where it goes: System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12

    Anyone have any more luck with this?

  • Bryna 66 posts 228 karma points
    Jun 26, 2019 @ 19:05
    Bryna
    0

    You have to make a composition something like below:

     public class MyComponent : IComponent
        {
            public void Initialize()
            {
                System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            }
    }
    

    I think it is also covered more exhaustively at https://our.umbraco.com/documentation/Implementation/Composing/

Please Sign in or register to post replies

Write your reply to:

Draft