Skip to content

Commit bc8e2a5

Browse files
committed
Reformatting agent troubleshooting articles.
1 parent b6c2f69 commit bc8e2a5

File tree

1 file changed

+79
-9
lines changed

1 file changed

+79
-9
lines changed

articles/virtual-desktop/troubleshoot-agent.md

Lines changed: 79 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ If you're seeing any of the following issues, this means that the boot loader, w
3535
To resolve this issue, start the RDAgent boot loader:
3636

3737
1. In the Services window, right-click **Remote Desktop Agent Loader**.
38+
3839
1. Select **Start**. If this option is greyed out for you, you don't have administrator permissions and will need to get them to start the service.
40+
3941
1. Wait 10 seconds, then right-click **Remote Desktop Agent Loader**.
42+
4043
1. Select **Refresh**.
44+
4145
1. If the service stops after you started and refreshed it, you may have a registration failure. For more information, see [INVALID_REGISTRATION_TOKEN](#error-invalid_registration_token).
4246

4347
## Error: INVALID_REGISTRATION_TOKEN
@@ -47,11 +51,17 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
4751
To resolve this issue, create a valid registration token:
4852

4953
1. To create a new registration token, follow the steps in the [Generate a new registration key for the VM](#step-3-generate-a-new-registration-key-for-the-vm) section.
54+
5055
1. Open Registry Editor.
56+
5157
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
58+
5259
1. Select **IsRegistered**.
60+
5361
1. In the **Value data:** entry box, type **0** and select **Ok**.
62+
5463
1. Select **RegistrationToken**.
64+
5565
1. In the **Value data:** entry box, paste the registration token from step 1.
5666

5767
> [!div class="mx-imgBorder"]
@@ -64,7 +74,9 @@ To resolve this issue, create a valid registration token:
6474
```
6575

6676
1. Go back to Registry Editor.
77+
6778
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
79+
6880
1. Verify that **IsRegistered** is set to 1 and there is nothing in the data column for **RegistrationToken**.
6981

7082
> [!div class="mx-imgBorder"]
@@ -77,14 +89,18 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
7789
To resolve this issue, check that you can reach the two endpoints referred to as *BrokerURI* and *BrokerURIGlobal*:
7890

7991
1. Open Registry Editor.
92+
8093
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
94+
8195
1. Make note of the values for **BrokerURI** and **BrokerURIGlobal**.
8296

8397
> [!div class="mx-imgBorder"]
8498
> ![Screenshot of broker uri and broker uri global](media/broker-uri.png)
8599
86100
1. Open a web browser and enter your value for *BrokerURI* in the address bar and add */api/health* to the end, for example `https://rdbroker-g-us-r0.wvd.microsoft.com/api/health`.
101+
87102
1. Open another tab in the browser and enter your value for *BrokerURIGlobal* in the address bar and add */api/health* to the end, for example `https://rdbroker.wvd.microsoft.com/api/health`.
103+
88104
1. If your network isn't blocking the connection to the broker, both pages will load successfully and will show a message stating **RD Broker is Healthy**, as shown in the following screenshots:
89105

90106
> [!div class="mx-imgBorder"]
@@ -120,7 +136,9 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
120136
On your session host VM, go to **Event Viewer** > **Windows Logs** > **Application**. If you see an event with ID 3277 with **InstallationHealthCheckFailedException** in the description, this means the stack listener isn't working because the terminal server has toggled the registry key for the stack listener.
121137

122138
To resolve this issue:
139+
123140
1. Check to see if [the stack listener is working](#error-stack-listener-isnt-working-on-a-windows-10-2004-session-host-vm)
141+
124142
1. If the stack listener isn't working, [manually uninstall and reinstall the stack component](#error-session-host-vms-are-stuck-in-upgrading-state).
125143

126144
## Error: ENDPOINT_NOT_FOUND
@@ -135,10 +153,15 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
135153
To resolve this issue:
136154

137155
1. Make sure the VM is powered on and hasn't been removed from the host pool.
156+
138157
1. Make sure that the VM hasn't exceeded the max session limit.
158+
139159
1. Make sure the [agent service is running](#error-the-rdagentbootloader-andor-remote-desktop-agent-loader-has-stopped-running) and the [stack listener is working](#error-stack-listener-isnt-working-on-a-windows-10-2004-session-host-vm).
160+
140161
1. Make sure [the agent can connect to the broker](#error-agent-cannot-connect-to-broker-with-invalid_form).
162+
141163
1. Make sure [your VM has a valid registration token](#error-invalid_registration_token).
164+
142165
1. Make sure [the VM registration token hasn't expired](./faq.yml).
143166

144167
## Error: InstallMsiException
@@ -148,7 +171,8 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
148171
To check whether group policy is blocking `msiexec.exe` from running:
149172

150173
1. Open Resultant Set of Policy by running **rsop.msc** from an elevated command prompt.
151-
1. In the **Resultant Set of Policy** window that pops up, go to **Computer Configuration > Administrative Templates > Windows Components > Windows Installer > Turn off Windows Installer**. If the state is **Enabled**, work with your Active Directory team to allow `msiexec.exe` to run.
174+
175+
1. In the **Resultant Set of Policy** window that pops up, go to **Computer Configuration > Administrative Templates** > **Windows Components** > **Windows Installer** > **Turn off Windows Installer**. If the state is **Enabled**, work with your Active Directory team to allow `msiexec.exe` to run.
152176

153177
> [!div class="mx-imgBorder"]
154178
> ![Screenshot of Windows Installer policy in Resultant Set of Policy](media/gpo-policy.png)
@@ -161,6 +185,7 @@ To check whether group policy is blocking `msiexec.exe` from running:
161185
On your session host VM, go to **Event Viewer** > **Windows Logs** > **Application**. If you see an event with ID 3277 with **InstallMsiException** in the description, a policy is blocking `cmd.exe` from launching. Blocking this program prevents you from running the console window, which is what you need to use to restart the service whenever the agent updates.
162186

163187
1. Open Resultant Set of Policy by running **rsop.msc** from an elevated command prompt.
188+
164189
1. In the **Resultant Set of Policy** window that pops up, go to **User Configuration > Administrative Templates > System > Prevent access to the command prompt**. If the state is **Enabled**, work with your Active Directory team to allow `cmd.exe` to run.
165190

166191
## Error: Stack listener isn't working on a Windows 10 2004 session host VM
@@ -170,15 +195,18 @@ On your session host VM, from a command prompt run `qwinsta.exe` and make note o
170195
To resolve this issue:
171196

172197
1. Open the Registry Editor.
198+
173199
1. Go to **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations**.
200+
174201
1. Under **WinStations** you may see several folders for different stack versions, select a folder that matches the version information you saw when running `qwinsta.exe` in a command prompt.
175-
1. Find **fReverseConnectMode** and make sure its data value is **1**. Also make sure that **fEnableWinStation** is set to **1**.
202+
- Find **fReverseConnectMode** and make sure its data value is **1**. Also make sure that **fEnableWinStation** is set to **1**.
176203

177204
> [!div class="mx-imgBorder"]
178205
> ![Screenshot of fReverseConnectMode](media/fenable-2.png)
179206
180-
1. If **fReverseConnectMode** isn't set to **1**, select **fReverseConnectMode** and enter **1** in its value field.
181-
1. If **fEnableWinStation** isn't set to **1**, select **fEnableWinStation** and enter **1** into its value field.
207+
- If **fReverseConnectMode** isn't set to **1**, select **fReverseConnectMode** and enter **1** in its value field.
208+
- If **fEnableWinStation** isn't set to **1**, select **fEnableWinStation** and enter **1** into its value field.
209+
182210
1. Repeat the previous steps for each folder that matches the version information you saw when running `qwinsta.exe` in a command prompt.
183211

184212
> [!TIP]
@@ -188,16 +216,21 @@ To resolve this issue:
188216
> - Create a group policy object (GPO) that sets the registry key value for the machines that need the change.
189217
190218
1. Restart your session host VM.
219+
191220
1. Open the Registry Editor.
221+
192222
1. Go to **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\ClusterSettings**.
223+
193224
1. Under **ClusterSettings**, find **SessionDirectoryListener** and make sure its data value is `rdp-sxs<version number`, where `<version number` matches the version information you saw when running `qwinsta.exe` in a command prompt .
225+
194226
1. If **SessionDirectoryListener** isn't set to `rdp-sxs<version number`, you'll need to follow the steps in the section [Your issue isn't listed here or wasn't resolved](#your-issue-isnt-listed-here-or-wasnt-resolved) below.
195227

196228
## Error: DownloadMsiException
197229

198230
On your session host VM, go to **Event Viewer** > **Windows Logs** > **Application**. If you see an event with ID 3277 with **DownloadMsiException** in the description, there isn't enough space on the disk for the RDAgent.
199231

200232
To resolve this issue, make space on your disk by:
233+
201234
- Deleting files that are no longer in user.
202235
- Increasing the storage capacity of your session host VM.
203236

@@ -212,6 +245,7 @@ If the status listed for session hosts in your host pool always says **Unavailab
212245
To resolve this issue, first reinstall the side-by-side stack:
213246

214247
1. Sign in to your session host VM as an administrator.
248+
215249
1. From an elevated PowerShell prompt run `qwinsta.exe` and make note of the version number that appears next to **rdp-sxs** in the *SESSIONNAME* column. If the *STATE* column for **rdp-tcp** and **rdp-sxs** entries isn't **Listen**, or if **rdp-tcp** and **rdp-sxs** entries aren't listed at all, it means that there's a stack issue.
216250

217251
1. Run the following command to stop the RDAgentBootLoader service:
@@ -221,7 +255,9 @@ To resolve this issue, first reinstall the side-by-side stack:
221255
```
222256

223257
1. Go to **Control Panel** > **Programs** > **Programs and Features**, or on Windows 11 go to the **Settings App > Apps**.
258+
224259
1. Uninstall the latest version of the **Remote Desktop Services SxS Network Stack** or the version listed in Registry Editor in **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations** under the value for **ReverseConnectionListener**.
260+
225261
1. Back at the PowerShell prompt, run the following commands to add the file path of the latest installer available on your session host VM for the side-by-side stack to a variable and list its name:
226262

227263
```powershell
@@ -236,6 +272,7 @@ To resolve this issue, first reinstall the side-by-side stack:
236272
```
237273

238274
1. Restart your session host VM.
275+
239276
1. From a command prompt run `qwinsta.exe` again and verify the *STATE* column for **rdp-tcp** and **rdp-sxs** entries is **Listen**. If not, you will need to [re-register your VM and reinstall the agent](#your-issue-isnt-listed-here-or-wasnt-resolved) component.
240277

241278
## Error: Session host VMs are stuck in Unavailable state
@@ -277,6 +314,7 @@ netsh winhttp set proxy proxy-server="http=<customerwebproxyhere>" bypass-list="
277314
Your session host VMs may be at their connection limit and can't accept new connections.
278315

279316
To resolve this issue, either:
317+
280318
- Decrease the max session limit. This ensures that resources are more evenly distributed across session hosts and will prevent resource depletion.
281319
- Increase the resource capacity of the session host VMs.
282320

@@ -291,10 +329,15 @@ To resolve this issue, [create session host VMs](expand-existing-host-pool.md) u
291329
The name of your session host VM has already been registered and is probably a duplicate.
292330

293331
To resolve this issue:
332+
294333
1. Follow the steps in the [Remove the session host from the host pool](#step-2-remove-the-session-host-from-the-host-pool) section.
334+
295335
1. [Create another VM](expand-existing-host-pool.md#add-virtual-machines-with-the-azure-portal). Make sure to choose a unique name for this VM.
336+
296337
1. Go to the [Azure portal](https://portal.azure.com) and open the **Overview** page for the host pool your VM was in.
338+
297339
1. Open the **Session Hosts** tab and check to make sure all session hosts are in that host pool.
340+
298341
1. Wait for 5-10 minutes for the session host status to say **Available**.
299342

300343
> [!div class="mx-imgBorder"]
@@ -303,9 +346,13 @@ To resolve this issue:
303346
## Your issue isn't listed here or wasn't resolved
304347

305348
If you can't find your issue in this article or the instructions didn't help you, we recommend you uninstall, reinstall, and re-register the Azure Virtual Desktop Agent. The instructions in this section will show you how to reregister your session host VM to the Azure Virtual Desktop service by:
306-
1. Uninstalling all agent, boot loader, and stack components
307-
1. Removing the session host from the host pool
308-
1. Generating a new registration key for the VM
349+
350+
1. Uninstalling all agent, boot loader, and stack components.
351+
352+
1. Removing the session host from the host pool.
353+
354+
1. Generating a new registration key for the VM.
355+
309356
1. Reinstalling the Azure Virtual Desktop Agent and boot loader.
310357

311358
Follow these instructions in this section if one or more of the following scenarios apply to you:
@@ -322,9 +369,12 @@ Follow these instructions in this section if one or more of the following scenar
322369
### Step 1: Uninstall all agent, boot loader, and stack component programs
323370

324371
Before reinstalling the agent, boot loader, and stack, you must uninstall any existing components from your VM. To uninstall all agent, boot loader, and stack component programs:
372+
325373
1. Sign in to your session host VM as an administrator.
326-
2. Go to **Control Panel** > **Programs** > **Programs and Features**, or on Windows 11 go to the **Settings App > Apps**.
327-
3. Uninstall the following programs, then restart your session host VM:
374+
375+
1. Go to **Control Panel** > **Programs** > **Programs and Features**, or on Windows 11 go to the **Settings App > Apps**.
376+
377+
1. Uninstall the following programs, then restart your session host VM:
328378

329379
> [!CAUTION]
330380
> When uninstalling **Remote Desktop Services SxS Network Stack**, you'll be prompted that *Remote Desktop Services* and *Remote Desktop Services UserMode Port Redirector* should be closed. If you're connected to the session host VM using RDP, select **Do not close applications** then select **OK**, otherwise your RDP connection will be closed.
@@ -348,10 +398,15 @@ Before reinstalling the agent, boot loader, and stack, you must uninstall any ex
348398
When you remove the session host from the host pool, the session host is no longer registered to that host pool. This acts as a reset for the session host registration. To remove the session host from the host pool:
349399

350400
1. Sign in to the [Azure portal](https://portal.azure.com).
401+
351402
1. In the search bar, type *Azure Virtual Desktop* and select the matching service entry.
403+
352404
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
405+
353406
1. Select **Session Hosts** to see the list of all session hosts in that host pool.
407+
354408
1. Look at the list of session hosts and tick the box next to the session host that you want to remove.
409+
355410
1. Select **Remove**.
356411

357412
> [!div class="mx-imgBorder"]
@@ -360,15 +415,20 @@ When you remove the session host from the host pool, the session host is no long
360415
### Step 3: Generate a new registration key for the VM
361416

362417
You must generate a new registration key that is used to re-register your session VM to the host pool and to the service. To generate a new registration key for the VM:
418+
363419
1. Sign in to the [Azure portal](https://portal.azure.com).
420+
364421
1. In the search bar, type *Azure Virtual Desktop* and select the matching service entry.
422+
365423
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
424+
366425
1. On the **Overview** blade, select **Registration key**.
367426

368427
> [!div class="mx-imgBorder"]
369428
> ![Screenshot of registration key in portal](media/reg-key.png)
370429
371430
1. Open the **Registration key** tab and select **Generate new key**.
431+
372432
1. Enter the expiration date and then select **Ok**.
373433

374434
> [!NOTE]
@@ -395,11 +455,17 @@ By reinstalling the most updated version of the agent and boot loader, the side-
395455
> ![Screenshot of pasted registration token](media/pasted-agent-token.png)
396456
397457
1. Run the boot loader installer.
458+
398459
1. Restart your session VM.
460+
399461
1. Sign in to the [Azure portal](https://portal.azure.com).
462+
400463
1. In the search bar, enter **Azure Virtual Desktop** and select the matching service entry.
464+
401465
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
466+
402467
1. Select **Session Hosts** to see the list of all session hosts in that host pool.
468+
403469
1. You should now see the session host registered in the host pool with the status **Available**.
404470

405471
> [!div class="mx-imgBorder"]
@@ -418,9 +484,13 @@ This registry key prevents the agent from installing the side-by-side stack, whi
418484
To resolve this issue, you'll need to remove the key:
419485

420486
1. Remove the DisableRegistryTools key from the three previously listed locations.
487+
421488
1. Uninstall and remove the affected side-by-side stack installation from the **Apps & Features** folder.
489+
422490
1. Remove the affected side-by-side stack's registry keys.
491+
423492
1. Restart your VM.
493+
424494
1. Start the agent and let it auto-install the side-by-side stack.
425495

426496
## Next steps

0 commit comments

Comments
 (0)