[SonarQube for Azure]
Issue Details
Deployment of the template has failed with following errors:
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug 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 'configureAppVM_DSC'. Error message: \"DSC Configuration 'Main' completed with error(s). Following are the first few: PowerShell DSC resource Grani_Download failed to execute Set-TargetResource functionality with error message: Status Code returns ''. Stop download stream from URI : 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.4.zip' The SendConfigurationApply function did not succeed.\"."\r\n }\r\n ]\r\n }\r\n}"}]}
OPERATION IDB5A75931E983113D
TRACKING ID79f1ea8a-96f9-4f74-9092-48c00af03a7c
STATUSConflict
PROVISIONING STATEFailed
TIMESTAMP25/06/2018, 15:15:03
DURATION8 minutes 42 seconds
TYPEMicrosoft.Compute/virtualMachines/extensions
RESOURCE ID/subscriptions/47bdd770-6069-4557-bf86-2a99da4b9e70/resourceGroups/SonarQube/providers/Microsoft.Compute/virtualMachines/sonarqubevm/extensions/configureAppVM_DSC
STATUSMESSAGE{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionProvisioningError",
"message": "VM has reported a failure when processing extension 'configureAppVM_DSC'. Error message: "DSC Configuration 'Main' completed with error(s). Following are the first few: PowerShell DSC resource Grani_Download failed to execute Set-TargetResource functionality with error message: Status Code returns ''. Stop download stream from URI : 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.4.zip' The SendConfigurationApply function did not succeed."."
}
]
}
}
RESOURCEsonarqubevm/configureAppVM_DSC
Anyone??? @rajbos maybe? @bmoore-msft @JackStromberg @wpschaub
I did change the version to 7.1 if I remember correctly and had to manually update the connectionstring after the VM came up.
Hi @rajbos . This happens during the DSC installation on the VM while provisioning. It seems to have an issue with the Grani Download validation for the sonarqube zip file. I tried it with 7.0,, 7.1 by adjusting the template, but his also causes the same issue.
After failure of the script extension, when logging in to the VM, I see that sonar is not installed at all.
Could you validate and let me know if you have the same issue? Tried all kinds of variations in 2 different subscriptions and all deployments with Sonar are failing currently
this is also reported in this thread 15 hrs ago by @yonga9121 in https://github.com/Azure/azure-quickstart-templates/issues/3514
I suspected it was in the download. Didn鈥檛 have that when I used it about a month ago.
Currently at a conference, so no time to test
I understand. Hopefully someone can look into the exact issue, since my knowledge in the DSC part is minimal.
I have same issue
Some additional info:
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug 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 'configureAppVM_DSC'. Error message: \\"DSC Configuration 'Main' completed with error(s). Following are the first few: PowerShell DSC resource Grani_Download failed to execute Set-TargetResource functionality with error message: Status Code returns ''. Stop download stream from URI : 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-7.0.zip' The SendConfigurationApply function did not succeed.\\".\"\r\n }\r\n ]\r\n }\r\n}"}]}
Just ran the template and encountered the same issue. Found someone else that worked around it by manually downloading the file first (probably storing it in blobstorage next to the template) and referencing it from there.
Checked the DSC log as described here, but that doesn't give me any new information...
I've got a hunch that SonarQube recently deprecated TLS 1.0 or 1.1 (currently they only support 1.2 on it according to some domain tools) and PowerShell has issues connecting on it. See reference here. No idea how to test and fix that.
Reached out to SonarQube to see if they can confirm that change. Will update if I hear anything from them.
Hi, I having same issue
{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug 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 'configureAppVM_DSC'. Error message: \\"DSC Configuration 'Main' completed with error(s). Following are the first few: PowerShell DSC resource Grani_Download failed to execute Set-TargetResource functionality with error message: Status Code returns ''. Stop download stream from URI : 'https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.6.4.zip' The SendConfigurationApply function did not succeed.\\".\"\r\n }\r\n ]\r\n }\r\n}"}]}
I've got the deploy working! Indeed, forcing the download with TLS 1.2 fixed the issue. Just one more test (with all TLS versions supported to prevent regressions in the future) and I will send in a pull request.

Awesome! Looking forward to your update.
Oh nice, how to change TLS version please ?
You can follow along here: https://github.com/rajbos/azure-quickstart-templates/tree/SonarQubeWinSSLIssue/sonarqube-azuresql
Do note: the 'Deploy to azure' button links to the original template. To test the fix, you'll need to use this link: https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Frajbos%2Fazure-quickstart-templates%2FSonarQubeWinSSLIssue%2Fsonarqube-azuresql%2Fazuredeploy.json
Next, for the _artifacts location parameter you'll need to pass in:
https://raw.githubusercontent.com/rajbos/azure-quickstart-templates/SonarQubeWinSSLIssue/sonarqube-azuresql
Note 2: I've tested the last change successfully, will send in a pull request for it.
Pull request has been merged, so this issue can be closed in my opinion.
Will do and thanks for your help!
Glad I could help!
Most helpful comment
I've got the deploy working! Indeed, forcing the download with TLS 1.2 fixed the issue. Just one more test (with all TLS versions supported to prevent regressions in the future) and I will send in a pull request.
