Forum Discussion
Started a few days ago at most: Agent on Session host no longer communicates properly with WVD
- Aug 15, 2019
ClearForward Thanks for reporting the issue. This is service side issue and we have fixed it few minutes back. Can you please verify if it working now. We would like to further investigate if that's not the case. Thanks.
Johan_Eriksson I'm having what I think is a related issue. Our setup is also from May 2019, and in the last 48 hours we're having constant issues.
Ever since our virtual desktop VMs auto-updated to Remote Desktop Services Infrastructure Agent 1.0.1006.2006, they keep falling into a bad state of "NoHeartbeat" after only a few minutes. When the VMs first boot, the status is "Available" and "LastHeartBeat" reflects the time of boot. We're able to connect to the pool without issue and can maintain sessions, but cannot start new sessions because the status changes to "NoHeartbeat".
If an admin restarts the "RDAgentBootloader" service, the status changes to "Available" and "LastHeartBeat" reflects the time of the service restart.
For reference, I am checking on the status of the pool with the "Get-RdsSessionHost" cmdlet.
- iconicmleeAug 15, 2019Copper ContributorDo you mind sending me your task scheduler settings please. I am in a bind and would like to get through the testing of the task scheduler you already did by reaching out. Thanks a million! GuyPaddock
- GuyPaddockAug 15, 2019Brass Contributor
One other power user tip: I found a Powershell cmdlet that makes it really easy to monitor the status of the session hosts so you can see the scheduled task in action.
You can get the cmdlet here:
http://wragg.io/watch-for-changes-with-powershell/You can run it to monitor session hosts this way:
{ Get-RdsSessionHost -TenantName "TENANT" -HostPoolName "HOST POOL" } | Watch-Command -Verbose -Continuous
If any values like status, heartbeat time, session count, etc change, it prints the output.
- GuyPaddockAug 15, 2019Brass Contributor
iconicmlee Sure!
I believe you will need to configure the task to run with highest privs under an admin account, since it needs to be able to stop and start system services:
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.2" xmlns="<a href="http://schemas.microsoft.com/windows/2004/02/mit/task" target="_blank">http://schemas.microsoft.com/windows/2004/02/mit/task</a>"> <RegistrationInfo> <Date>2019-08-14T17:06:39.646478</Date> <Author>CLOUD\guy</Author> <URI>\ITSA-46 Workaround</URI> </RegistrationInfo> <Triggers> <BootTrigger> <Repetition> <Interval>PT1M</Interval> <StopAtDurationEnd>false</StopAtDurationEnd> </Repetition> <Enabled>true</Enabled> </BootTrigger> </Triggers> <Principals> <Principal id="Author"> <UserId>S-1-5-21-2615066866-973913876-715106564-1108</UserId> <LogonType>Password</LogonType> <RunLevel>HighestAvailable</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>PT72H</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>NET</Command> <Arguments>STOP RdAgentBootloader</Arguments> </Exec> <Exec> <Command>NET</Command> <Arguments>START RdAgentBootloader</Arguments> </Exec> </Actions> </Task>
- GuyPaddockAug 15, 2019Brass ContributorAlso: once the task is created, you have to restart the VM to kick it off. Just running the task manually doesn't cause it to recur. It also seems like editing the task causes it to stop running until the next reboot.