Error when trying to start Universal.Server

Post upgrade error when trying to start service

2023-03-07 16:42:24.386 +00:00 [ERR] Error discovering modules
System.ComponentModel.Win32Exception (2): An error occurred trying to start process ‘Universal.Server’ with working directory ‘E:\UniversalRepository’. The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at UniversalAutomation.JobProcessManager.StartProcessAsCurrentUser(String powerShellPath, String commandLine, Variable credential, Action`1 onAgentOutput) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\Automation\JobProcessManager.cs:line 431
at UniversalAutomation.JobProcessManager.StartModuleDiscovery(ExecutionEnvironment environment) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\Automation\JobProcessManager.cs:line 289
at Universal.Server.Services.ModuleDiscoveryService.<>c__DisplayClass8_0.b__0() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\ModuleDiscoveryService.cs:line 134

The service is running but fails to respond to

PS C:\Program Files (x86)\Universal> Invoke-RestMethod http://localhost:5000/user
Invoke-RestMethod : The underlying connection was closed: The connection was closed unexpectedly.

I’ve seen a similar error recently but it didn’t prevent the service from starting. Do you have any other errors in the logs?

so i managed to get the service to start but testing the web endpoint with an invoke-webrequest fails to return any data.

2023-03-08 09:35:33.933 +00:00 [ERR] Error discovering modules
System.ComponentModel.Win32Exception (2): An error occurred trying to start process ‘Universal.Server’ with working directory ‘E:\UniversalRepository’. The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at UniversalAutomation.JobProcessManager.StartProcessAsCurrentUser(String powerShellPath, String commandLine, Variable credential, Action`1 onAgentOutput) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\Automation\JobProcessManager.cs:line 431
at UniversalAutomation.JobProcessManager.StartModuleDiscovery(ExecutionEnvironment environment) in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\Automation\JobProcessManager.cs:line 289
at Universal.Server.Services.ModuleDiscoveryService.<>c__DisplayClass8_0.b__0() in C:\actions-runner_work\universal\universal\src\Universal.Server\Services\ModuleDiscoveryService.cs:line 134
2023-03-08 09:36:00.409 +00:00 [INF] Starting groom job.
2023-03-08 09:36:00.415 +00:00 [INF] Script Sync-WSUS.ps1 has a max history of 100
2023-03-08 09:36:00.434 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.434 +00:00 [INF] Script Clean-WSUSserver.ps1 has a max history of 100
2023-03-08 09:36:00.450 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.450 +00:00 [INF] Script Reindex-WSUSDatabase.ps1 has a max history of 100
2023-03-08 09:36:00.457 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.457 +00:00 [INF] Script Approve-Updates.ps1 has a max history of 100
2023-03-08 09:36:00.468 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.468 +00:00 [INF] Script Get-NewProducts.ps1 has a max history of 100
2023-03-08 09:36:00.475 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.475 +00:00 [INF] Script Update-AWSWorkspaces.ps1 has a max history of 100
2023-03-08 09:36:00.481 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.481 +00:00 [INF] Script Get-ProductionChanges.ps1 has a max history of 100
2023-03-08 09:36:00.492 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.493 +00:00 [INF] Script Restart-WindowsServers.ps1 has a max history of 100
2023-03-08 09:36:00.501 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.501 +00:00 [INF] Script Remove-OldADComputers.ps1 has a max history of 100
2023-03-08 09:36:00.511 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.511 +00:00 [INF] Script Report-BitlockerStatus.ps1 has a max history of 100
2023-03-08 09:36:00.519 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.519 +00:00 [INF] Script Upload-AADPictures.ps1 has a max history of 100
2023-03-08 09:36:00.527 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.527 +00:00 [INF] Script Update-AzureUPN.ps1 has a max history of 100
2023-03-08 09:36:00.538 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.538 +00:00 [INF] Script Repair-HomeDrivePermissions.ps1 has a max history of 100
2023-03-08 09:36:00.546 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.546 +00:00 [INF] Script FlattenADGroups.ps1 has a max history of 100
2023-03-08 09:36:00.557 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.558 +00:00 [INF] Script Grant-ExecutionPermissions.ps1 has a max history of 100
2023-03-08 09:36:00.564 +00:00 [INF] Script has 0 jobs to delete.
2023-03-08 09:36:00.568 +00:00 [INF] Groom date is: 2/6/2023 9:36:00 AM
2023-03-08 09:36:00.576 +00:00 [INF] Old jobs: 0
2023-03-08 09:36:00.735 +00:00 [INF] Finished groom job.
2023-03-08 09:36:00.746 +00:00 [INF] Starting heartbeat job.
2023-03-08 09:36:00.848 +00:00 [INF] Finished heartbeat job.

2023-03-08 09:37:23.343 +00:00 [INF] User profile is available. Using ‘C:\Windows\system32\config\systemprofile\AppData\Local\ASP.NET\DataProtection-Keys’ as key repository and Windows DPAPI to encrypt keys at rest.
2023-03-08 09:37:24.924 +00:00 [INF] Now listening on: http://[::]:5000
2023-03-08 09:37:24.924 +00:00 [INF] Now listening on: https://[::]:443
2023-03-08 09:37:24.924 +00:00 [INF] Now listening on: https://localhost:5000
2023-03-08 09:37:24.966 +00:00 [INF] Application started. Hosting environment: Production; Content root path: C:\Program Files (x86)\Universal
2023-03-08 09:37:44.972 +00:00 [INF] Starting module discovery using Process.
2023-03-08 09:37:47.418 +00:00 [INF] Starting module discovery using Process.
2023-03-08 09:37:48.739 +00:00 [INF] PSModulePath (Integrated) - C:\Program Files\PowerShell\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Universal\Modules;E:\UniversalRepository\Modules
2023-03-08 09:37:50.557 +00:00 [INF] Starting module discovery using Process.
2023-03-08 09:37:51.870 +00:00 [INF] PSModulePath (Windows PowerShell 5.1) - \WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Universal\Modules;E:\UniversalRepository\Modules
2023-03-08 09:37:53.632 +00:00 [INF] Starting module discovery using Process.
2023-03-08 09:37:57.340 +00:00 [INF] PSModulePath (WSUS) - \WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Universal\Modules;E:\UniversalRepository\Modules
2023-03-08 09:37:57.994 +00:00 [INF] Starting module discovery using Process.
2023-03-08 09:38:02.231 +00:00 [INF] PSModulePath (ActiveDirectory) - \WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\PowerShell\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Universal\Modules;E:\UniversalRepository\Modules
2023-03-08 09:38:03.417 +00:00 [INF] Ignoring authentication methods becuase this instance is unlicensed.
2023-03-08 09:38:03.773 +00:00 [INF] Scheduling script 1 on schedule 0 0,6,12,18 * * * with time zone Europe/London.
2023-03-08 09:38:03.776 +00:00 [INF] Scheduling job ‘WSUS Sync’ with schedule WSUS Sync on time zone Europe/London
2023-03-08 09:38:03.810 +00:00 [INF] Scheduling script 2 on schedule 0 1 * * 1 with time zone Europe/London.
2023-03-08 09:38:03.810 +00:00 [INF] Scheduling job ‘Clean WSUS Sync server’ with schedule Clean WSUS Sync server on time zone Europe/London
2023-03-08 09:38:03.813 +00:00 [INF] Scheduling script 3 on schedule 0 2 * * 6 with time zone Europe/London.
2023-03-08 09:38:03.813 +00:00 [INF] Scheduling job ‘Re-Index WSUS database’ with schedule Re-Index WSUS database on time zone Europe/London
2023-03-08 09:38:03.815 +00:00 [INF] Scheduling script 4 on schedule 0 1,7,13,19 * * * with time zone Europe/London.
2023-03-08 09:38:03.815 +00:00 [INF] Scheduling job ‘Approve WSUS Updates’ with schedule Approve WSUS Updates on time zone Europe/London
2023-03-08 09:38:03.817 +00:00 [INF] Scheduling script 5 on schedule 0 23 * * * with time zone Europe/London.
2023-03-08 09:38:03.817 +00:00 [INF] Scheduling job ‘Get WSUS new products and classifications’ with schedule Get WSUS new products and classifications on time zone Europe/London
2023-03-08 09:38:03.819 +00:00 [INF] Scheduling script 8 on schedule */15 * * * * with time zone Europe/London.
2023-03-08 09:38:03.819 +00:00 [INF] Scheduling job ‘Evaluate Maintenance Windows and Restart the devices.’ with schedule Evaluate Maintenance Windows and Restart the devices. on time zone Europe/London
2023-03-08 09:38:03.821 +00:00 [INF] Scheduling script 7 on schedule 5 8 * * 4 with time zone Europe/London.
2023-03-08 09:38:03.821 +00:00 [INF] Scheduling job ‘Scrub the upcoming scheduled changes and notify them.’ with schedule Scrub the upcoming scheduled changes and notify them. on time zone Europe/London
2023-03-08 09:38:03.823 +00:00 [INF] Scheduling script 9 on schedule 0 7 * * * with time zone Europe/London.
2023-03-08 09:38:03.823 +00:00 [INF] Scheduling job ‘Remove old AD Computers’ with schedule Remove old AD Computers on time zone Europe/London
2023-03-08 09:38:03.824 +00:00 [INF] Scheduling script 10 on schedule 0 */2 * * * with time zone Europe/London.
2023-03-08 09:38:03.825 +00:00 [INF] Scheduling job ‘Report Bitlocker status for AD Computers.’ with schedule Report Bitlocker status for AD Computers. on time zone Europe/London
2023-03-08 09:38:03.826 +00:00 [INF] Scheduling script 11 on schedule 15 * * * * with time zone Europe/London.
2023-03-08 09:38:03.826 +00:00 [INF] Scheduling job ‘Upload images produced by SetUserDetails to Azure AD’ with schedule Upload images produced by SetUserDetails to Azure AD on time zone Europe/London
2023-03-08 09:38:03.853 +00:00 [INF] Scheduling script 12 on schedule 30 * * * * with time zone Europe/London.
2023-03-08 09:38:03.853 +00:00 [INF] Scheduling job ‘Updates the UPN of the users created by the Starters Dashboard.’ with schedule Updates the UPN of the users created by the Starters Dashboard. on time zone Europe/London
2023-03-08 09:38:03.855 +00:00 [INF] Scheduling script 14 on schedule 15 * * * * with time zone Europe/London.
2023-03-08 09:38:03.855 +00:00 [INF] Scheduling job ‘Flatten AD groups with flattenGroup = true’ with schedule Flatten AD groups with flattenGroup = true on time zone Europe/London
2023-03-08 09:38:03.859 +00:00 [INF] Scheduling script 6 on schedule 30 6 * * 6 with time zone Europe/London.
2023-03-08 09:38:03.859 +00:00 [INF] Scheduling job ‘Start AWS workspaces and launch the updates.’ with schedule Start AWS workspaces and launch the updates. on time zone Europe/London
2023-03-08 09:38:06.592 +00:00 [INF] PSModulePath (AzureActiveDirectory) - C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files (x86)\Universal\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Universal\Modules;E:\UniversalRepository\Modules
2023-03-08 09:38:06.907 +00:00 [INF] Starting job using Process.
2023-03-08 09:38:10.337 +00:00 [INF] Starting job using Process.
2023-03-08 09:38:14.208 +00:00 [INF] Running git sync, if configured.
2023-03-08 09:38:16.045 +00:00 [INF] Scheduling git sync service.
2023-03-08 09:38:16.046 +00:00 [INF] Scheduling heartbeat job.
2023-03-08 09:38:16.047 +00:00 [INF] Scheduling update check.
2023-03-08 09:38:16.056 +00:00 [INF] Starting security proxy.
2023-03-08 09:38:16.056 +00:00 [INF] Security service already started
2023-03-08 09:38:16.056 +00:00 [INF] Enabling autoreload.

Could it be due to the 2023-03-08 09:38:03.417 +00:00 [INF] Ignoring authentication methods becuase this instance is unlicensed. ??