Skip to content

Commit b076199

Browse files
committed
Learn Editor: Update extension-based-hybrid-runbook-worker.md
1 parent d4a3179 commit b076199

File tree

1 file changed

+121
-34
lines changed

1 file changed

+121
-34
lines changed

articles/automation/troubleshoot/extension-based-hybrid-runbook-worker.md

Lines changed: 121 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This article provides information on troubleshooting and resolving issues with A
1515

1616
To help troubleshoot issues with extension-based Hybrid Runbook Workers:
1717

18-
- Check the OS is supported and the prerequisites have been met. See [Prerequisites](../extension-based-hybrid-runbook-worker-install.md#prerequisites).
18+
- Check the OS is supported, and the prerequisites have been met. See [Prerequisites](../extension-based-hybrid-runbook-worker-install.md#prerequisites).
1919

2020
- Check whether the system-assigned managed identity is enabled on the VM. Azure VMs and Arc enabled Azure Machines should be enabled with a system-assigned managed identity.
2121

@@ -51,8 +51,9 @@ The Hybrid Runbook Worker jobs failed as it was unable to import Az modules.
5151

5252
As a workaround, you can follow these steps:
5353

54-
1. Go to the folder: C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1722.0\HybridAgent
55-
1. Edit the file with the name *Orchestrator.Sandbox.exe.config*
54+
1. Go to the folder: `C:\Program Files\Microsoft Monitoring Agent\Agent\AzureAutomation\7.3.1722.0\HybridAgent`
55+
1. Edit the file with the name `Orchestrator.Sandbox.exe.config`
56+
5657
1. Add the following lines inside the `<assemblyBinding>` tags:
5758
```xml
5859
<dependentAssembly>
@@ -82,13 +83,14 @@ For Custom user on the Hybrid Runbook Worker, update the permissions in the foll
8283
### Scenario: Job failed to start as the Hybrid Worker wasn't available when the scheduled job started
8384

8485
#### Issue
85-
Job fails to start on a Hybrid Worker and you see the following error:
86+
Job fails to start on a Hybrid Worker, and you see the following error:
8687

8788
*Failed to start, as hybrid worker wasn't available when scheduled job started, the hybrid worker was last active at mm/dd/yyyy*.
8889

8990
#### Cause
9091
This error can occur due to the following reasons:
91-
- The machines doesn't exist anymore.
92+
- The machines don't exist anymore.
93+
9294
- The machine is turned off and is unreachable.
9395
- The machine has a network connectivity issue.
9496
- The Hybrid Runbook Worker extension has been uninstalled from the machine.
@@ -178,13 +180,40 @@ Sometimes the installation process might get stuck.
178180
### Resolution
179181
Follow the steps mentioned below to install Hybrid Worker extension again:
180182

181-
1. Open PowerShell console
182-
1. Remove registry entry, if present: *HKLM:/Software/Microsoft/Azure/HybridWorker*
183-
1. Remove the registry entry, if present: *HKLM:/Software/Microsoft/HybridRunbookWorkerV2*
184-
1. Go to Hybrid Worker extension installation folder
185-
Cd "C:\Packages\Plugins\Microsoft.Azure.Automation.HybridWorker.HybridWorkerForWindows\<version>"
186-
1. Install Hybrid Worker extension: `.\bin\install.ps1`
187-
1. Enable Hybrid Worker extension: `.\bin\enable.ps1`
183+
1. Open PowerShell console.
184+
185+
1. **Remove the registry key**, if present: `HKLM:\Software\Microsoft\Azure\HybridWorker`
186+
187+
1. PowerShell code to remove the registry key along with any subkeys and values under it.:
188+
189+
```powershell
190+
Get-Item HKLM:\Software\Microsoft\Azure\HybridWorker | Remove-Item -Recurse
191+
```
192+
193+
1. **Remove the registry key**, if present: `HKLM:\Software\Microsoft\HybridRunbookWorkerV2`
194+
195+
1. PowerShell code to remove the registry key along with any subkeys and values under it.:
196+
197+
```powershell
198+
Get-Item HKLM:\Software\Microsoft\HybridRunbookWorkerV2 | Remove-Item -Recurse
199+
```
200+
1. Navigate to the Hybrid Worker extension installation folder:
201+
202+
> [!TIP]
203+
> Replace `*` in the below command with the specific version that is installed if you know it.
204+
```powershell
205+
cd "C:\Packages\Plugins\Microsoft.Azure.Automation.HybridWorker.HybridWorkerForWindows\*"
206+
```
207+
1. **Install** the Hybrid Worker extension:
208+
209+
```powershell
210+
.\bin\install.ps1
211+
```
212+
1. **Enable** the Hybrid Worker extension:
213+
214+
```powershell
215+
.\bin\enable.ps1
216+
```
188217

189218
### Scenario: Uninstallation process of Hybrid Worker extension on Windows VM gets stuck
190219

@@ -195,13 +224,40 @@ You have installed a Hybrid Worker extension on a Windows VM from the portal, bu
195224
Sometimes the uninstallation process might get stuck.
196225

197226
#### Resolution
198-
1. Open PowerShell console
199-
1. Go to Hybrid Worker extension installation folder
200-
Cd "C:\Packages\Plugins\Microsoft.Azure.Automation.HybridWorker.HybridWorkerForWindows\<version\>"
201-
1. Disable Hybrid Worker extension: `.\bin\disable.cmd`
202-
1. Uninstall Hybrid Worker extension: `.\bin\uninstall.ps1`
203-
1. Remove registry entry, if present: *HKLM:/Software/Microsoft/Azure/HybridWorker*
204-
1. Remove the registry entry, if present: *HKLM:/Software/Microsoft/HybridRunbookWorkerV2*
227+
1. Open PowerShell console.
228+
229+
1. Navigate to the Hybrid Worker extension installation folder:
230+
231+
> [!TIP]
232+
> Replace `*` in the below command with the specific version that is installed if you know it.
233+
```powershell
234+
cd "C:\Packages\Plugins\Microsoft.Azure.Automation.HybridWorker.HybridWorkerForWindows\*"
235+
```
236+
1. **Disable** the Hybrid Worker extension:
237+
238+
```powershell
239+
.\bin\disable.cmd
240+
```
241+
1. **Uninstall** the Hybrid Worker extension:
242+
243+
```powershell
244+
.\bin\uninstall.ps1
245+
```
246+
1. **Remove registry key**, if present: `HKLM:\Software\Microsoft\Azure\HybridWorker`
247+
248+
1. PowerShell code to remove the registry key along with any subkeys and values under it.:
249+
250+
```powershell
251+
Get-Item HKLM:\Software\Microsoft\Azure\HybridWorker | Remove-Item -Recurse
252+
```
253+
254+
1. **Remove the registry key**, if present: `HKLM:\Software\Microsoft\HybridRunbookWorkerV2`
255+
256+
1. PowerShell code to remove the registry key along with any subkeys and values under it.:
257+
258+
```powershell
259+
Get-Item HKLM:\Software\Microsoft\HybridRunbookWorkerV2 | Remove-Item -Recurse
260+
```
205261
206262
207263
### Scenario: Installation process of Hybrid Worker extension on Linux VM gets stuck
@@ -213,11 +269,30 @@ You have installed a Hybrid Worker extension on a Linux VM from the portal, but
213269
Sometimes the uninstallation process might get stuck.
214270
215271
#### Resolution
216-
1. Go to folder: `rm -r /home/hweautomation/state`
217-
1. Go to Hybrid Worker extension installation folder */var/lib/waagent/Microsoft.Azure.Automation.HybridWorker.HybridWorkerForLinux-\<version\>/*
218-
1. Go to above folder and run command `rm mrseq`
219-
1. Install Hybrid Worker Extension: *"installCommand": "./extension_shim.sh -c ./HWExtensionHandlers.py -i"*
220-
1. Enable Hybrid Worker extension: *"enableCommand": "./extension_shim.sh -c ./HWExtensionHandlers.py -e"*
272+
1. **Delete** the `state` folder:
273+
```bash
274+
rm -r /home/hweautomation/state
275+
```
276+
1. Navigate to the Hybrid Worker extension installation folder:
277+
> [!TIP]
278+
> Replace `*` in the below command with the specific version that is installed if you know it.
279+
```bash
280+
cd /var/lib/waagent/Microsoft.Azure.Automation.HybridWorker.HybridWorkerForLinux-*/
281+
```
282+
283+
1. **Delete** the mrseq file:
284+
```bash
285+
rm mrseq
286+
```
287+
1. **Install** the Hybrid Worker Extension:
288+
```bash
289+
./extension_shim.sh -c ./HWExtensionHandlers.py -i
290+
```
291+
292+
1. **Enable** the Hybrid Worker extension:
293+
```bash
294+
./extension_shim.sh -c ./HWExtensionHandlers.py -e
295+
```
221296

222297
### Scenario: Uninstallation process of Hybrid Worker extension on Linux VM gets stuck
223298

@@ -230,10 +305,20 @@ Sometimes the uninstallation process might get stuck.
230305
#### Resolution
231306
Follow the steps mentioned below to completely uninstall Hybrid Worker extension:
232307

233-
1. Go to Hybrid Worker Extension installation folder:
234-
*/var/lib/waagent/Microsoft.Azure.Automation.HybridWorker.HybridWorkerForLinux-\<version\>/*
235-
1. Disable the extension: `"disableCommand": "./extension_shim.sh -c ./HWExtensionHandlers.py -d" `
236-
1. Uninstall the extension: `"uninstallCommand": "./extension_shim.sh -c ./HWExtensionHandlers.py -u"`
308+
1. Navigate to the Hybrid Worker Extension installation folder:
309+
> [!TIP]
310+
> Replace `*` in the below command with the specific version that is installed if you know it.
311+
```bash
312+
cd /var/lib/waagent/Microsoft.Azure.Automation.HybridWorker.HybridWorkerForLinux-*/
313+
```
314+
1. **Disable** the Hybrid Worker extension:
315+
```bash
316+
./extension_shim.sh -c ./HWExtensionHandlers.py -d
317+
```
318+
1. **Uninstall** the Hybrid Worker extension:
319+
```bash
320+
./extension_shim.sh -c ./HWExtensionHandlers.py -u
321+
```
237322

238323
### Scenario: Runbook execution fails
239324

@@ -270,12 +355,14 @@ Check the **Microsoft-SMA** event log for a corresponding event with the descrip
270355

271356
A runbook running on a Hybrid Runbook Worker fails with the following error message:
272357

273-
`Connect-AzAccount : No certificate was found in the certificate store with thumbprint 0000000000000000000000000000000000000000`
274-
`At line:3 char:1`
275-
`+ Connect-AzAccount -ServicePrincipal -Tenant $Conn.TenantID -Appl ...`
276-
`+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
277-
` + CategoryInfo : CloseError: (:) [Connect-AzAccount],ArgumentException`
278-
` + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzAccountCommand`
358+
```
359+
Connect-AzAccount : No certificate was found in the certificate store with thumbprint 0000000000000000000000000000000000000000
360+
At line:3 char:1
361+
+ Connect-AzAccount -ServicePrincipal -Tenant $Conn.TenantID -Appl ...
362+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
363+
+ CategoryInfo : CloseError: (:) [Connect-AzAccount],ArgumentException
364+
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzAccountCommand
365+
```
279366

280367
#### Cause
281368

0 commit comments

Comments
 (0)