Azure / Azure/azure-quickstart-templates
Failed to download all specified files. Exiting. Error Message: Unable to connect to the remote server
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
azuredeploy.json
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
Deployment fails with the following error:
"VM has reported a failure when processing extension 'adduserassqladmin'. Error message: \\\"Failed to download all specified files. Exiting. Error Message: Unable to connect to the remote server\\\".\"\r\n }\r\n ]\r\n }\r\n}"}]}
For some reason all extensions were downloaded but one and, as the result, the deployment was not successful.
1. Add an extension to your template that depends on the Virtual Machine.
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('sqlName'),'/joindomain')]",
"location": "[resourceGroup().location]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', variables('sqlName'))]"
],
"properties": {
"publisher": "Microsoft.Compute",
"type": "JsonADDomainExtension",
"typeHandlerVersion": "1.3",
"autoUpgradeMinorVersion": true,
"settings": {
"Name": "[parameters('domainToJoin')]",
"OUPath": "[parameters('ouPath')]",
"User": "[concat(parameters('domainToJoin'), '\\', parameters('adminUsername'))]",
"Restart": "true",
"Options": "[parameters('domainJoinOptions')]"
},
"protectedSettings": {
"Password": "[parameters('adminPassword')]"
}
}
},
{
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('sqlName'),'/adduserassqladmin')]",
"location": "[resourceGroup().location]",
"apiVersion": "2015-06-15",
"dependsOn": [
"[resourceId('Microsoft.Compute/virtualMachines/extensions/',variables('sqlName'),'joindomain') ]"
],
"properties": {
"autoUpgradeMinorVersion": true,
"protectedSettings": {
"commandToExecute": "[concat('powershell.exe .\\', parameters('addUserAsSQLAdminScriptName'), ' ', parameters('adminUsername'))]"
},
"publisher": "Microsoft.Compute",
"settings": {
"fileUris": [
"[concat(parameters('scriptLocation'), parameters('addUserAsSQLAdminScriptName'))]"
]
},
"type": "CustomScriptExtension",
"typeHandlerVersion": "1.9"
}
}
2. Add another extension that executes a test script
3. Deploy a VM using the template
Actual result:
From time to time the deployment fails because one of the scripts was not downloaded.
Expected result:
Such an issue never occurs.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with azuredeploy.json and the VM extension definitions for joindomain and adduserassqladmin. Reproduce the deployment using the listed test-extension steps and inspect the intermittent fileUris download failure. Done means the deployment no longer fails because a specified script was not downloaded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100