Recently, I encountered a common deployment error while helping a customer set up an AlwaysOn Availability Group in Microsoft Azure. The deployment was done via template deployment, but it failed with the following error message:
StatusMessage { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "DeploymentFailed", "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/common-deployment-errors 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 'configuringAlwaysOn'. Error message: \\\"DSC Configuration 'CreateFailoverCluster' completed with error(s). Following are the first few: PowerShell DSC resource MicrosoftAzure_xSqlAvailabilityGroupListener failed to execute Set-TargetResource functionality with error message: The running command stopped because the preference variable \\\"ErrorActionPreference\\\" or common parameter is set to Stop: An error occurred while attempting to bring the resource 'SQLAUTHORITY-AG' online.\\n The cluster resource could not be brought online by the resource monitor The SendConfigurationApply function did not succeed.\\\".\"\r\n }\r\n ]\r\n }\r\n}" } ] } ] }
Upon further investigation, I found an interesting error in the Event log of the node:
Log Name: System Source: Microsoft-Windows-FailoverClustering Date: 7/26/2016 6:11:45 PM Event ID: 1193 Task Category: Network Name Resource Level: Error Keywords: User: SYSTEM Computer: demo.sqlauthority.local Description: Cluster network name resource 'alwayson-ag-sqlauth-listener01' failed to create its associated computer object in domain 'sqlauthority.local' for the following reason: Resource online. The associated error code is: -1073741790
The error indicated that the cluster network name resource failed to create its associated computer object in the domain. This error can occur due to various reasons, such as permission issues or naming conventions.
In this particular case, we discovered that the listener name was being created in Active Directory (AD) with a truncated name due to the 15-character limit. Even though the template specified the name as ‘alwayson-ag-sqlauth-listener01’, it was still creating the name as ‘alwayson-ag-sq’.
The solution to this issue is to ensure that computer names are kept within the limit of 15 characters. This can be achieved by following the naming conventions in Active Directory for computers, domains, sites, and OUs.
It’s important to note that this error can be encountered during the deployment of an AlwaysOn Availability Group in Microsoft Azure, but it can also occur in other environments. Understanding the root cause of the error and implementing the appropriate solution is crucial for a successful deployment.
For more information on common deployment errors and their resolutions, you can refer to the Azure documentation.