You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-desktop/troubleshoot-agent.md
+79-9Lines changed: 79 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,13 @@ If you're seeing any of the following issues, this means that the boot loader, w
35
35
To resolve this issue, start the RDAgent boot loader:
36
36
37
37
1. In the Services window, right-click **Remote Desktop Agent Loader**.
38
+
38
39
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
+
39
41
1. Wait 10 seconds, then right-click **Remote Desktop Agent Loader**.
42
+
40
43
1. Select **Refresh**.
44
+
41
45
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).
42
46
43
47
## Error: INVALID_REGISTRATION_TOKEN
@@ -47,11 +51,17 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
47
51
To resolve this issue, create a valid registration token:
48
52
49
53
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
+
50
55
1. Open Registry Editor.
56
+
51
57
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
58
+
52
59
1. Select **IsRegistered**.
60
+
53
61
1. In the **Value data:** entry box, type **0** and select **Ok**.
62
+
54
63
1. Select **RegistrationToken**.
64
+
55
65
1. In the **Value data:** entry box, paste the registration token from step 1.
56
66
57
67
> [!div class="mx-imgBorder"]
@@ -64,7 +74,9 @@ To resolve this issue, create a valid registration token:
64
74
```
65
75
66
76
1. Go back to Registry Editor.
77
+
67
78
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
79
+
68
80
1. Verify that **IsRegistered** is set to 1 and there is nothing in the data column for **RegistrationToken**.
69
81
70
82
> [!div class="mx-imgBorder"]
@@ -77,14 +89,18 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
77
89
To resolve this issue, check that you can reach the two endpoints referred to as *BrokerURI* and *BrokerURIGlobal*:
78
90
79
91
1. Open Registry Editor.
92
+
80
93
1. Go to **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RDInfraAgent**.
94
+
81
95
1. Make note of the values for **BrokerURI** and **BrokerURIGlobal**.
82
96
83
97
> [!div class="mx-imgBorder"]
84
98
> 
85
99
86
100
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
+
87
102
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
+
88
104
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:
89
105
90
106
> [!div class="mx-imgBorder"]
@@ -120,7 +136,9 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
120
136
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.
121
137
122
138
To resolve this issue:
139
+
123
140
1. Check to see if [the stack listener is working](#error-stack-listener-isnt-working-on-a-windows-10-2004-session-host-vm)
141
+
124
142
1. If the stack listener isn't working, [manually uninstall and reinstall the stack component](#error-session-host-vms-are-stuck-in-upgrading-state).
125
143
126
144
## Error: ENDPOINT_NOT_FOUND
@@ -135,10 +153,15 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
135
153
To resolve this issue:
136
154
137
155
1. Make sure the VM is powered on and hasn't been removed from the host pool.
156
+
138
157
1. Make sure that the VM hasn't exceeded the max session limit.
158
+
139
159
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
+
140
161
1. Make sure [the agent can connect to the broker](#error-agent-cannot-connect-to-broker-with-invalid_form).
162
+
141
163
1. Make sure [your VM has a valid registration token](#error-invalid_registration_token).
164
+
142
165
1. Make sure [the VM registration token hasn't expired](./faq.yml).
143
166
144
167
## Error: InstallMsiException
@@ -148,7 +171,8 @@ On your session host VM, go to **Event Viewer** > **Windows Logs** > **Applicati
148
171
To check whether group policy is blocking `msiexec.exe` from running:
149
172
150
173
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.
152
176
153
177
> [!div class="mx-imgBorder"]
154
178
> 
@@ -161,6 +185,7 @@ To check whether group policy is blocking `msiexec.exe` from running:
161
185
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.
162
186
163
187
1. Open Resultant Set of Policy by running **rsop.msc** from an elevated command prompt.
188
+
164
189
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.
165
190
166
191
## 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
170
195
To resolve this issue:
171
196
172
197
1. Open the Registry Editor.
198
+
173
199
1. Go to **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations**.
200
+
174
201
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**.
176
203
177
204
> [!div class="mx-imgBorder"]
178
205
> 
179
206
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
+
182
210
1. Repeat the previous steps for each folder that matches the version information you saw when running `qwinsta.exe` in a command prompt.
183
211
184
212
> [!TIP]
@@ -188,16 +216,21 @@ To resolve this issue:
188
216
> - Create a group policy object (GPO) that sets the registry key value for the machines that need the change.
189
217
190
218
1. Restart your session host VM.
219
+
191
220
1. Open the Registry Editor.
221
+
192
222
1. Go to **HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\ClusterSettings**.
223
+
193
224
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
+
194
226
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.
195
227
196
228
## Error: DownloadMsiException
197
229
198
230
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.
199
231
200
232
To resolve this issue, make space on your disk by:
233
+
201
234
- Deleting files that are no longer in user.
202
235
- Increasing the storage capacity of your session host VM.
203
236
@@ -212,6 +245,7 @@ If the status listed for session hosts in your host pool always says **Unavailab
212
245
To resolve this issue, first reinstall the side-by-side stack:
213
246
214
247
1. Sign in to your session host VM as an administrator.
248
+
215
249
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.
216
250
217
251
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:
221
255
```
222
256
223
257
1. Go to **Control Panel** > **Programs** > **Programs and Features**, or on Windows 11 go to the **Settings App > Apps**.
258
+
224
259
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
+
225
261
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:
226
262
227
263
```powershell
@@ -236,6 +272,7 @@ To resolve this issue, first reinstall the side-by-side stack:
236
272
```
237
273
238
274
1. Restart your session host VM.
275
+
239
276
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.
240
277
241
278
## Error: Session host VMs are stuck in Unavailable state
@@ -277,6 +314,7 @@ netsh winhttp set proxy proxy-server="http=<customerwebproxyhere>" bypass-list="
277
314
Your session host VMs may be at their connection limit and can't accept new connections.
278
315
279
316
To resolve this issue, either:
317
+
280
318
- Decrease the max session limit. This ensures that resources are more evenly distributed across session hosts and will prevent resource depletion.
281
319
- Increase the resource capacity of the session host VMs.
282
320
@@ -291,10 +329,15 @@ To resolve this issue, [create session host VMs](expand-existing-host-pool.md) u
291
329
The name of your session host VM has already been registered and is probably a duplicate.
292
330
293
331
To resolve this issue:
332
+
294
333
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
+
295
335
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
+
296
337
1. Go to the [Azure portal](https://portal.azure.com) and open the **Overview** page for the host pool your VM was in.
338
+
297
339
1. Open the **Session Hosts** tab and check to make sure all session hosts are in that host pool.
340
+
298
341
1. Wait for 5-10 minutes for the session host status to say **Available**.
299
342
300
343
> [!div class="mx-imgBorder"]
@@ -303,9 +346,13 @@ To resolve this issue:
303
346
## Your issue isn't listed here or wasn't resolved
304
347
305
348
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
+
309
356
1. Reinstalling the Azure Virtual Desktop Agent and boot loader.
310
357
311
358
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
322
369
### Step 1: Uninstall all agent, boot loader, and stack component programs
323
370
324
371
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
+
325
373
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:
328
378
329
379
> [!CAUTION]
330
380
> 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
348
398
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:
349
399
350
400
1. Sign in to the [Azure portal](https://portal.azure.com).
401
+
351
402
1. In the search bar, type *Azure Virtual Desktop* and select the matching service entry.
403
+
352
404
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
405
+
353
406
1. Select **Session Hosts** to see the list of all session hosts in that host pool.
407
+
354
408
1. Look at the list of session hosts and tick the box next to the session host that you want to remove.
409
+
355
410
1. Select **Remove**.
356
411
357
412
> [!div class="mx-imgBorder"]
@@ -360,15 +415,20 @@ When you remove the session host from the host pool, the session host is no long
360
415
### Step 3: Generate a new registration key for the VM
361
416
362
417
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
+
363
419
1. Sign in to the [Azure portal](https://portal.azure.com).
420
+
364
421
1. In the search bar, type *Azure Virtual Desktop* and select the matching service entry.
422
+
365
423
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
424
+
366
425
1. On the **Overview** blade, select **Registration key**.
367
426
368
427
> [!div class="mx-imgBorder"]
369
428
> 
370
429
371
430
1. Open the **Registration key** tab and select **Generate new key**.
431
+
372
432
1. Enter the expiration date and then select **Ok**.
373
433
374
434
> [!NOTE]
@@ -395,11 +455,17 @@ By reinstalling the most updated version of the agent and boot loader, the side-
395
455
> 
396
456
397
457
1. Run the boot loader installer.
458
+
398
459
1. Restart your session VM.
460
+
399
461
1. Sign in to the [Azure portal](https://portal.azure.com).
462
+
400
463
1. In the search bar, enter **Azure Virtual Desktop** and select the matching service entry.
464
+
401
465
1. Select **Host pools** and select the name of the host pool that your session host VM is in.
466
+
402
467
1. Select **Session Hosts** to see the list of all session hosts in that host pool.
468
+
403
469
1. You should now see the session host registered in the host pool with the status **Available**.
404
470
405
471
> [!div class="mx-imgBorder"]
@@ -418,9 +484,13 @@ This registry key prevents the agent from installing the side-by-side stack, whi
418
484
To resolve this issue, you'll need to remove the key:
419
485
420
486
1. Remove the DisableRegistryTools key from the three previously listed locations.
487
+
421
488
1. Uninstall and remove the affected side-by-side stack installation from the **Apps & Features** folder.
489
+
422
490
1. Remove the affected side-by-side stack's registry keys.
491
+
423
492
1. Restart your VM.
493
+
424
494
1. Start the agent and let it auto-install the side-by-side stack.
0 commit comments