Manually Deregister Linux Hybrid Runbook Worker | Quisitive
Manually Deregister Linux Hybrid Runbook Worker
July 30, 2019
Matthew Dowst
I recently ran into an issue where a Linux based Hybrid Runbook Worker

I recently ran into an issue where a Linux based Hybrid Runbook Worker where no longer connecting to Azure Automation. The problem was compounded by the fact that the agent would not let me deregister from Azure Automation.

If I tried to deregister the server I received the error message:

12deregister raise Exception(“Failed to deregister worker. [response_status=” + str(response.status_code) + “]”)Exception: Failed to deregister worker. [response_status=404]

If I tried to register the hybrid worker I received the error message:

12register raise Exception(“Unable to register, an existing worker was found. Please deregister any existing worker and “Exception: Unable to register, an existing worker was found. Please deregister any existing worker and try again.

If you are receive either or both errors, you can follow the steps below to resolve it.

-s -d opinsights.azure.com 6. Once the agent is installed you need to wait for the initial sync to complete, before continuing with the additional steps. This can take 15 minutes or so. You’ll know it is done when the directory /opt/microsoft/omsconfig/modules/nxOMSAutomationWorker is present. 7. Register Hybrid Runbook Worker sudo python /opt/microsoft/omsconfig/modules/nxOMSAutomationWorker/DSCResources/MSFT_nxOMSAutomationWorkerResource/automationworker/scripts/onboarding.py –register -w -k -g -e