Hello everyone.
I have reviewed every forum post on the topic of Keep Alive and other Automated Tasks not running and it seems this has been a persistent issue for many years that has never really been properly addressed or resolved with a scattering of users either changing the store URL or modifying the source code themselves to work around it which is not really the best solution unless from the developer of the platform. Sadly it is my turn to experience this issue and we require assistance as I am out of ideas. Willing to Screen-share the server if anyone has an idea or needs to see the configuration (pm me)
We are working on a new customer NOP store with this issue being the primary problem keeping us from going live with this site. I am the Web Host that is providing the environment and we are working in conjunction with a nopCommerce Developer to bring this site to life. Developer has spent many hours on this as have I so we are now reaching out to the Forum. Here is what I have
Windows 2016 Server
NopCommerce 4.50.3
URL equivalent: nopstage.customerstore.com (obscured real name of site)
HTTPS enabled: Yes
Store URL: https://nopstage.customerstore.com/
Symptom: None of the Automated Tasks are running but most will run manually except for the Keep Alive task which gives us a 403 error.
Steps taken so far with no success:
1) many variations of the Store URL with and without https as well as with and without the trailing "/". Also tried with and without SSL enabled
2) removed all Request Filters and other URL Rewrite rules in IIS that could be passing the response to a 403 error
3) Since it is in development currently, we allowed FULL permissions to the entire domain for all users.
4) entered in a hard-coded HOSTS file record for the IP to Domain
5) Verified the website is accessible from the server's browser and is ping-able.
6) tried white-listing the server and website IP address.
7) verified that going to https://nopstage.customerstore.com/keepalive shows me "I am alive!" in the browser (obscured actual domain name)
8) verified that going to https://nopstage.customerstore.com/keepalive/index displays a blank page.
9) NOTE that everything else works fine with the site so I am not concerned with any server prerequisites not being met as if that were the case, nothing would work.
Not sure if this will help as many have posted similar log results but here is the log entry for the Keep-Alive error we are experiencing (I changed store name and actual domain name)
Short message
The "Keep alive" scheduled task failed with the "One or more errors occurred. (Response status code does not indicate success: 403 (Forbidden: Access is denied.).)" error (Task type: "Nop.Services.Common.KeepAliveTask, Nop.Services". Store name: "Customer Store". Task run address: "https://nopstage.customerstore.com/scheduletask/runtask").
Full message
System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 403 (Forbidden: Access is denied.).)
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden: Access is denied.).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at Nop.Services.Common.StoreHttpClient.KeepAliveAsync()
at Nop.Services.Common.KeepAliveTask.ExecuteAsync()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at Nop.Services.ScheduleTasks.ScheduleTaskRunner.ExecuteTask(ScheduleTask scheduleTask)
at Nop.Services.ScheduleTasks.ScheduleTaskRunner.<>c__DisplayClass8_0.<ExecuteAsync>b__0()
at Nop.Core.Caching.MemoryCacheManager.PerformActionWithLock(String key, TimeSpan expirationTime, Action action)
at Nop.Services.ScheduleTasks.ScheduleTaskRunner.ExecuteAsync(ScheduleTask scheduleTask, Boolean forceRun, Boolean throwException, Boolean ensureRunOncePerPeriod)
Any help with some new ideas would be most welcome. As I mentioned, I am available to screenshare if you PM me.
- Mark