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:
12 | deregister 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:
12 | register 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.