Forum Discussion

andersidahl's avatar
andersidahl
Brass Contributor
Mar 25, 2019

RD Session Host stuck at Status: "Upgrading"

Hi, I am trying to add a Windows Server 2016 as a session host. I have followed the steps at: https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell and it shows up as a session host with PS with the Get-RdsSessionHost command, but the status in the output is stuck at Status : Upgrading. In the event logs in gives a bunch of errors, these are a couple of them: Events: Microsoft.RDInfra.Agent.Monitoring.MonitoringAgentInstallSettings Value of the 'AgentMonitoringAuthId' is empty Microsoft.RDInfra.Agent.Monitoring.MonitoringAgentInstallSettings RDInfraAgent key doesn't exist Unable to retrieve DefaultAgent from registry: System.NullReferenceException RDAgentBootLoader.BootLoaderSettings.get_DefaultAgentPath() i C:\agent\_work\1\s\src\RDAgent\src\RDAgentBootLoader\BootLoaderSettings.cs:rad 82

17 Replies

  • DBR14's avatar
    DBR14
    Iron Contributor
    This garbage still happens even today. At least every other day to one of our hosts. We're running the newer VMs generations too - D16sv4's. Sometimes it'll upgrade with people connected and just create so many headaches, or it'll upgrade and get stuck and then nobody can log into it, but it registers as open sessions so my auto-scale logic doesn't open up more machines and again, creates issues. Figure it out...
    • evasse's avatar
      evasse
      Former Employee
      Please reach out to support for debugging. THank you
  • Stephen Ferrero's avatar
    Stephen Ferrero
    Copper Contributor

    Same problem here. It seems like the agent is upgrading immediately after installing. I now have two versions of the agent installed.

    I tried uninstalling the agent and re-installing using what looks like an upgraded installer (version 1.0.1.10) but now instead of Status: Upgrading, my RD host is in Status: Unavailable.

     

    Also have these additional errors in the RemoteDesktopServices-MonitoringLogger and RemoteDesktopServices-MonitoringAgentLoader logs respectively

     

    Microsoft.RDInfra.Monitoring.AgentMonitoringService.AgentMonitoringServiceWorker
    Value of the 'AgentMonitoringAccount' in 'SOFTWARE\Microsoft\RDMonitoringAgent' is empty

    -------

    Microsoft.RDInfra.Monitoring.AgentMonitoringService.AgentMonitoringServiceWorker
    Fail to set default dimensions Invalid Operation: Fail to set default dimensions, error code is 2147942487.. Error code is 80070057

    • alhenriq_ms's avatar
      alhenriq_ms
      Icon for Microsoft rankMicrosoft

      Stephen Ferrero 

      Hi Stephen,

       

      The monitoring agent is reporting this because there was a failure onboarding - please stop the bootloader service and try re-installing the WVD Agent. Verify that the DefaultAgent key exists under

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDAgentBootLoader -> DefaultAgent.

       

      Then start the bootloader service.

       

      thanks,

      -al

       

      • Stephen Ferrero's avatar
        Stephen Ferrero
        Copper Contributor

        alhenriq_ms 

        Thanks,

         

        I seem to be OK now after a complete removal and re-install. I see the agent version incremented to 1.0.1.18 so perhaps something has changed.

         

        I do still see duplicated entries in appwiz for the RDS Infrastructure Agent. Looks like the original version I installed, and the updated agent are both still installed.

         

  • evasse's avatar
    evasse
    Former Employee

    andersidahl: Can you please re-run the template and create a new host pool? Delete the existing one it got into a bad state. If this happens again please let us know as we would like to get into the root cause of those issues.

    • andersidahl's avatar
      andersidahl
      Brass Contributor

      evasse Hi Eva, thanks for reaching out.

       

      I am not deploying with a template, that one works fine. I am trying to deploy to a Windows Server 2016 previously deployed.

       

      The steps done are from: https://docs.microsoft.com/en-us/azure/virtual-desktop/create-host-pools-powershell. Everything seems to go fine with all steps, except that we are unable to connect after doing such steps and also when running the Get-RdsSessionHost it shows the agent as still updating. On the server its also some events which shows some error, I could send that directly if you have a secure drop for that?

       

      Best regards, Anders

      • alhenriq_ms's avatar
        alhenriq_ms
        Icon for Microsoft rankMicrosoft

        andersidahl 

        Hi Anders,

         

        The above exception, to me, indicates that the bootloader cannot find the agent because the required location is missing a registry key (Unable to retrieve DefaultAgent path from registry).

         

        After installing the WVD Agent - it should have declared itself the default agent by creating this key in the AgentBootLoader regkey location HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDAgentBootLoader -> DefaultAgent

         

        Can you verify that this key exists? Also please make sure you stop the AgentBootLoader service before trying to install the WVD Agent MSI.

         

        thanks,

        -al

         

         

         

Resources