Scheduled tasks and store url seem to be fine and I am able to run manually with the exception of keep alive which fails with 404 error. At times the scheduled tasks will run on schedule for anywhere from 5 minutes to 8 hours and will then stop. Nothing is logged in the system log. They sometimes will run when I reload the application, but mostly not. No reasoning that I have been able to tell.
Version is 4.50.4 with a few modifications to the source code.
Any one else experience this and find a solution?
Thanks for reading and all suggestions are appreciated.
ilyas_patel, The HTTP_HOST is www.hrpracing.com and the HOST values is www.hrpracing.com/
The Store URL is https://www.hrpracing.com/.
Unfortunately there is no log being produced, only the 404 error when I set Keep Alive active.
New York, When I go to /keepalive/index page, I do get a blank page, not the 404. IT fails when I try to run manually from the scheduled task page or try to run it scheduled. Non of the other scheduled tasks run reliably, running for a short time and then not restarting for hours or days. It will suddenly restart the scheduled tasks and work for a little while.
The only thing in the log relates to the keep alive: Log level Error Short message The "Keep alive" scheduled task failed with the "One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)" error (Task type: "Nop.Services.Common.KeepAliveTask". Store name: "Hepfner Racing Products". Task run address: "https://www.hrpracing.com/scheduletask/runtask"). Full message System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).) ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at System.Net.Http.HttpClient.GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) at Nop.Services.Common.StoreHttpClient.KeepAliveAsync() in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Services\Common\StoreHttpClient.cs:line 43 at Nop.Services.Common.KeepAliveTask.ExecuteAsync() in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Services\Common\KeepAliveTask.cs:line 32 --- 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) in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Services\ScheduleTasks\ScheduleTaskRunner.cs:line 79 at Nop.Services.ScheduleTasks.ScheduleTaskRunner.<>c__DisplayClass8_0.<ExecuteAsync>b__0() in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Services\ScheduleTasks\ScheduleTaskRunner.cs:line 146 at Nop.Core.Caching.MemoryCacheManager.PerformActionWithLock(String key, TimeSpan expirationTime, Action action) in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Core\Caching\MemoryCacheManager.cs:line 214 at Nop.Services.ScheduleTasks.ScheduleTaskRunner.ExecuteAsync(ScheduleTask scheduleTask, Boolean forceRun, Boolean throwException, Boolean ensureRunOncePerPeriod) in D:\DEV-Nop\NOP-4-50-4\nopCommerce_4.50.4_Source Mod Traction\Libraries\Nop.Services\ScheduleTasks\ScheduleTaskRunner.cs:line 146 IP address 126.96.36.199 Customer Page URL https://www.hrpracing.com/Admin/ScheduleTask/RunNow/2 Referrer URL https://www.hrpracing.com/Admin/ScheduleTask/List Created on 3/1/2023 8:06:56 PM
The HTTP_HOST is www.hrpracing.com and the HOST values is www.hrpracing.com/
Do you have a / at the end of the Host values - If so remove the / and see if that makes a differnce
I have tried that with no success.
We have a test site and a live site. On the test site the scheduled tasks runs while on the live site it does not. We swapped the test and live (repointed and save live db to test db) and the problem stays with the live site. Not sure what I am missing.
Are you using cloudflare? I got the same issue. I have reconfigure cloudflare and my schedule task getting worked
Pls up-vote the answer, if it helps you!
Thank's, Sangeet Shah ==================================================== Need any professional assistance? Drop us your requirements on [email protected] https://nopadvance.com Your PERFECT nopCommerce GOLD Solution Partner
Turning on asp filter gave me a couple of failures, info: Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker Authorization failed for the request at filter 'Nop.Web.Framework.Mvc.Filters.HttpsRequirementAttribute+HttpsRequirementFilter'.
This comes up twice after a restart. Not sure if this has anything to do with the issue of scheduled tasks not running. Nothing appears in the NopCommerce log and event log for IIS.