In the past few months, I have had to work with various issues with DNN/Evoq sites not executing scheduler jobs. A number of various blog posts, as well as forum posts, have been started on the issue, and all point to a similar issue with regards to case-sensitivity with the scheduler and the web server name. I had a recent situation though where I had fixed all of the issues outlined but was still seeing an error.
The Error
There was a single, non-descript error in the EventLog when the scheduler went to start. The error detail was as follows.
System.InvalidOperationException: Sequence contains more than one matching element at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate) at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.GetServer(String executingServer) at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.LoadQueueFromTimer() at DotNetNuke.Services.Scheduling.Scheduler.CoreScheduler.Start()
The error message although cryptic to site administrators makes it easy to fix.
The Fix
Based on the above error I assumed that I had multiple entries with the same web-server name. So I ran the following query to check on this.
The results of this query looked similar to the following.
ServerId | ServerName | Enabled |
---|---|---|
2 | Test-Server | false |
3 | PROD_WEB | false |
4 | PROD_WEB | false |
5 | PROD_WEB | true |
The problem was with the duplicate entries for the PROD_WEB server, not a case sensitivity issue, but a true data issue. The fix was simple.
I hope that this helps those of you with scheduler issues!