UiPath / Infrastructure

42 stars 60 forks source link

Install-UiPathRobots.ps1 error #125

Closed AdnanHabibMirza closed 3 years ago

AdnanHabibMirza commented 3 years ago

i am facing this error while deploying robot template in powershell after orchestrator template deployment (successful)

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'CSExtension'. Error message: \\\"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'Invoke-RestMethod : {\\\"message\\\":\\\"An error has occurred.\\\",\\\"errorCode\\\":0,\\\"resourceIds\\\":null}\\r\\nAt C:\\\\Packages\\\\Plugins\\\\Microsoft.Compute.CustomScriptExtension\\\\1.10.12\\\\Downloads\\\\0\\\\Install-UiPathRobots.ps1:149 char:17\\r\\n+ ... etFolders = Invoke-RestMethod -Uri \\\"$o...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)\\\"\\r\\n\\r\\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot \"\r\n }\r\n ]\r\n }\r\n}"},{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"VMExtensionProvisioningError\",\r\n \"message\": \"VM has reported a failure when processing extension 'CSExtension'. Error message: \\\"Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'Add-UiPathRobotFolder : Terminating error: {\\\"message\\\":\\\"An error has occurred.\\\",\\\"errorCode\\\":0,\\\"resourceIds\\\":null}\\r\\nAt C:\\\\Packages\\\\Plugins\\\\Microsoft.Compute.CustomScriptExtension\\\\1.10.12\\\\Downloads\\\\0\\\\Install-UiPathRobots.ps1:86 char:5\\r\\n+ Add-UiPathRobotFo...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)\\\"\\r\\n\\r\\nMore information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot \"\r\n }\r\n ]\r\n }\r\n}"}]}}

ubikusss commented 3 years ago

Hey, thanks for reporting! Do the versions match? The Robot version and the orchestrator version?

AdnanHabibMirza commented 3 years ago

I resolved it by using robot 20.10.8 with orchestrator 21.4.1. Now robot template is working fine. I am encountering this error when I redeploy the orchestrator template (1st deployment is always successful)

{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"DeploymentFailed\",\r\n \"message\": \"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.\",\r\n \"details\": [\r\n {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"{\\r\\n \\\"error\\\": {\\r\\n \\\"code\\\": \\\"InUseSubnetCannotBeDeleted\\\",\\r\\n \\\"message\\\": \\\"Subnet haa-integration is in use by /subscriptions/xyz/resourceGroups/abc/providers/Microsoft.Network/virtualNetworks/haaVNet01/subnets/haa-integration/serviceAssociationLinks/AppServiceLink and cannot be deleted. In order to delete the subnet, delete all the resources within the subnet. See aka.ms/deletesubnet.\\\",\\r\\n \\\"details\\\": []\\r\\n }\\r\\n}\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}"}]}}

I checked on portal subnet haa-integration of vnet haaVNet01 is delegated to Microsoft.Web/serverFarms. if i set subnet delegation to None it gives the same error stated above which i am getting by re deploying in powershell.

ubikusss commented 3 years ago

Thanks for trying and fixing it!

As far as I understand you are trying to update using templates. If that is the case that is not currently supported. That might be implemented in the future but I have no ETA.