Closed hfloyd closed 3 months ago
A change to the way the transform rule was written, provided by Support seems to have resolved the issue.
<?xml version="1.0" encoding="utf-8" ?>
<settings xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<keepAlive disableKeepAliveTask="false" keepAlivePingUrl="https://PROJECT ENV URL GOES HERE.euwest01.umbraco.io/api/keepalive/ping" xdt:Locator="Match(keepAlivePingUrl)" xdt:Transform="Replace"/>
</settings>
Actually, the issue is back... and now using "localhost" url - so it seems the transform DOESN'T work.
Error in log:
Message:
Keep alive failed (at '"http://localhost/umbraco/api/keepalive/ping"').
Exception:
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:80
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Scheduling.KeepAlive.<PerformRunAsync>d__5.MoveNext()
On another Umbraco Cloud project (let's call it "H"), I saw 3000+ keepalive errors on the live site Error Log in the portal - all like this:
Message: Keep alive failed (at '"https://localhost/umbraco/api/keepalive/ping"').
Exception:
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.InternalEndConnect(IAsyncResult asyncResult)
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Scheduling.KeepAlive.<PerformRunAsync>d__5.MoveNext()
I added some umbracoSettings.config.xdt files, set up as follows:
<?xml version="1.0" encoding="utf-8" ?>
<settings xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
keepAlive
@disableKeepAliveTask
Disables the periodic KeepAliveTask when set to "true".
Use this setting to disable the KeepAliveTask in case you already have an alternative.
For example, Azure App Service has keep alive functionality built-in.
Defaults to "false".
@keepAlivePingUrl
The url of the KeepAlivePing action. By default, the url will use the umbracoApplicationUrl setting as the basis.
Change this setting to specify an alternative url to reach the KeepAlivePing action. eg http://localhost/umbraco/api/keepalive/ping
Defaults to "{umbracoApplicationUrl}/api/keepalive/ping".
-->
<keepAlive disableKeepAliveTask="false" keepAlivePingUrl="https://SITEALIAS.euwest01.umbraco.io/api/keepalive/ping"
xdt:Transform="Replace"/>
</settings>
And after several hours, I checked the Live Log and no longer saw those errors.
Project "H": Umbraco Id Umbraco 8.17.0 Deploy 4.3.0.0 Forms 8.7.6
Thanks for the bug report. We have created a ticket in our backlog. We will consider it and try to reproduce the issue.
Note - this solution does not work for v7 - as 'keepAlive' is apparently not a supported config settings element - so the site won't startup if you try to use this v8 solution, meaning that you can't configure the URL being requested for the keepAlive.
This might be resolvable on v7 using IIS Rewite if the requested URI for the task was something other than /umbraco - for more details see #533 - but at the moment I am logging a variety of HOST/URI combinations for the request, such as:
Failed (at "https://{custom-host}.:443/umbraco") -- note the invalid .: Failed (at "https://{project}.euwest01.umbraco.io:443/umbraco") Failed (at "https://{guid}.azurewebsites.net:443/umbraco")
I'm seeing a lot of these in my v8 cloud sites still - to confirm it's happening on Localhost URL for me
Keep alive failed (at '"https://localhost/umbraco/api/keepalive/ping"').
Exception :
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.InternalEndConnect(IAsyncResult asyncResult)
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.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Umbraco.Web.Scheduling.KeepAlive.
Hi there ðŸ¤
It seems like this is quite an old issue, and to me, it sounds looks like, and quacks like a CMS Issue 🦆 😅. Independent of the Umbraco Cloud, I assume that the symptoms would occur on any IIS-hosted processes, and ties into how Umbraco is resolving the address.
I am going to close this issue, and if this still is a problem please create an issue on the Umbraco CMS Tracker .
Kind regards @mclausen Cloud Platform/Core Teamlead
Issue description
I keep getting these errors on the live site error log. I used an UmbracoSettings.config transform to set the proper domain name, so the error is not a localhost 404 (a common issue I've seen elsewhere).
Versions
Umbraco Id Umbraco 8.17.0 Deploy 4.3.0.0 Forms 8.8.0