Forum Discussion
Windows Virtual Desktop Agent Upgrade Failed
Can't tell why, but the WVD Agent is updating and for some reason can't start up with new version and then rollback to the previous version. But doesn't get out of this loop and the service stops working.
AgentVersion : 1.0.2195.6400
AssignedUser :
OsVersion : 10.0.14393
SxSStackVersion : rdp-sxs200826002
Status : UpgradeFailed
UpdateState : Failed
LastUpdateTime : 04/11/2020 14:43:04
UpdateErrorMessage : Method not found: 'Microsoft.Extensions.DependencyInjection.IHttpClientBuilder
Microsoft.Extensions.DependencyInjection.HttpClientFactoryServiceCollectionExtensions.AddHttpClient(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.String, System.Action`1<System.Net.Http.HttpClient>)'.
I searched for an option to disable automatic upgrade, but couldn't find one so far.
The most recent version that Microsoft has available is the one installed, so why is the agent trying to install to a newer version, if it isn't available yet?
- alhenriq_msMicrosoft
Hi simonsays_pt
Can you please look in the event logs on that VM (Under "Windows Logs" -> Application)
This looks like an exception caught by the RDAgentBootLoader - if your application log has too many entries - you can filter the current log and apply this XML filter
<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[System[Provider[@Name='RDAgentBootLoader']]]</Select>
</Query>
</QueryList>We can start here to see what why the service is failing.
thanks,
-al
- simonsays_ptBrass Contributor
alhenriq_msthanks in advance.
Here is the exception:
BootLoader exception:System.MissingMethodException: Method not found: 'Microsoft.Extensions.DependencyInjection.IHttpClientBuilder Microsoft.Extensions.DependencyInjection.HttpClientFactoryServiceCollectionExtensions.AddHttpClient(Microsoft.Extensions.DependencyInjection.IServiceCollection, System.String, System.Action`1<System.Net.Http.HttpClient>)'.
at Microsoft.RDInfra.Diagnostics.Agent.DiagnosticsHelperMethods.AddRDAgentDiagnostics(IServiceCollection services, RDComponent currentComponent)
at Microsoft.RDInfra.RDAgent.Service.Startup.ConfigureServices(IServiceCollection services) in E:\agent\_work\2\s\src\RDAgent\src\Service\Startup.cs:line 99
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
at Microsoft.RDInfra.RDAgent.Service.RDAgentMain.CreateRDAgentWebHost(String workingDirectory) in E:\agent\_work\2\s\src\RDAgent\src\Service\RDAgentMain.cs:line 40
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
at RDAgentBootLoader.RDAgentBootLoader.<BootLoaderStartAsync>d__8.MoveNext() in C:\agent\_work\92\s\src\RDAgent\src\RDAgentBootLoader\RDAgentBootLoader.cs:line 53- simonsays_ptBrass Contributor
- DBR14Iron Contributor
So all of our SessionHosts are going into an unavailable state after they update to 1.0.2839.400. The previous version they are fine. If I uninstall the agents, the sxs, and remove and re-add it to the hostpool its fine for a little bit, then as soon as it updates it going to unavailable.
I built a new session host which starts off on a different version and is fine, soon as it updates it goes into this state. WTH is going on with this?