HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

I’ve built a few dashboards and they have been running perfectly without any issues until a few days ago. Whenever I try opening any of the dashboards or going to the admin console I receive the following error. I have not made any changes and/or updates. Any help will be greatly appreciated.


I’ve looked into this option but I find it odd that everything just stopped working when no updates have been made to anything.

These are some of the errors I see in the Event Viewer.

Application: w3wp.exe CoreCLR Version: 4.700.19.56402 .NET Core Version: 3.1.0 Description: The process was terminated due to an unhandled exception. Exception Info: System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at UniversalAutomation.MemoryTable1.First() in D:\a\universal\universal\src\UniversalAutomation.Common\MemoryTable.cs:line 44 at Universal.Server.Services.SecurityProxy.Start() in D:\a\universal\universal\src\Universal.Server\Services\SecurityProxy.cs:line 56 at UniversalAutomation.StartupService.StartAsync(CancellationToken cancellationToken) in D:\a\universal\universal\src\Universal.Server\Services\StartupService.cs:line 89 at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) at Universal.Server.Program.Main(String[] args) in D:\a\universal\universal\src\Universal.Server\Program.cs:line 31


Product: PowerShell Universal
Version: 1.5.16

Have a look to see if this KB has been installed - KB5003638

I’ve uninstalled it temporarily and the dashboards are running again, it must screw with the .net.

I’ve raised this with @adam

Thank you for your response.

I just looked at all my Windows Updates and I don’t have KB5003638.

Can you look in the PSU log? It looks like the settings are missing for some reason.

This is what is line 46.

var settings = _database.Settings.First();

The log does say that it cant find the configuration file.

2021-06-29 03:29:03 [INFO] (Hangfire.BackgroundJobServer) Starting Hangfire Server using job storage: ‘Hangfire.MemoryStorage.MemoryStorage’
2021-06-29 03:29:03 [INFO] (Hangfire.BackgroundJobServer) Using the following options for Hangfire Server:
Worker count: 10
Listening queues: ‘default’
Shutdown timeout: 00:00:15
Schedule polling interval: 00:00:15
2021-06-29 03:29:03 [INFO] (Hangfire.Server.BackgroundServerProcess) Server xxxxxxxxxxxxxx successfully announced in 127.2718 ms
2021-06-29 03:29:03 [INFO] (Hangfire.Server.BackgroundServerProcess) Server xxxxxxxxxxxxxx is starting the registered dispatchers: ServerWatchdog, ServerJobCancellationWatcher, ExpirationManager, CountersAggregator, Worker, DelayedJobScheduler, RecurringJobScheduler…
2021-06-29 03:29:03 [INFO] (Hangfire.Server.BackgroundServerProcess) Server xxxxxxxxxxxxxx all the dispatchers started
fail: UniversalAutomation.Services.ConfigurationScript[0]
Failed to read configuration file. settings.ps1
System.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at UniversalAutomation.Services.SettingsConfigurationScript.OnReadAfterAllAsync(Boolean initialSync) in D:\a\universal\universal\src\UniversalAutomation\Services\Configuration\Settings.cs:line 24 at UniversalAutomation.Services.ConfigurationScript1.ReadAsync(Boolean initialSync) in D:\a\universal\universal\src\UniversalAutomation\Services\Configuration\ConfigurationScript.cs:line 203
info: UniversalAutomation.JobProcessManager[0]
Starting job using Process.

I tried looking for that path but I’m not even sure why it’s even mentioning a D drive. Where would I enter the code you provided?

The D drive is from the builder. It’s just from the stack trace in the C# code. Can you share what is in your settings.ps1 file?

The settings is actually completely empty.


Can you try deleting the file?

That worked! Thank you so much! I noticed after opening my dashboards that a new settings file was not created, is that normal?

I’m curious as to what happened to the settings file, why would it be empty all of the sudden?

A settings file shouldn’t be created automatically unless you change some settings. It certainly shouldn’t be empty. I’ll resolve this by ensuring that an empty file doesn’t cause this problem because I’m not totally sure how this happened.

That makes sense.

Thank you very much for your prompt replies. And thank you for looking into this.