Azure / azure-quickstart-templates

Azure Quickstart Templates
https://aka.ms/azqst
MIT License
14.06k stars 16.13k forks source link

rds-deployment-existing-ad * DSC failed * Error downloading https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip #5486

Open rstamp opened 5 years ago

rstamp commented 5 years ago

rds-deployment-existing-ad https://github.com/Azure/azure-quickstart-templates/tree/master/rds-deployment-existing-ad/

Issue Details

"message": "VM has reported a failure when processing extension 'sessionhost'. Error message: \"The DSC Extension failed to execute: Error downloading https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip after 29 attempts: The remote name could not be resolved: 'raw.githubusercontent.com'.

Repro steps (if necessary, delete otherwise)

1. 2. 3. 4. 5.

pchalabi commented 5 years ago

@rstamp I was having this same issue, it looks like the URL has an extra / before Configuration.zip. I edited this but am still getting this same message, unfortunately.

GrooveCS commented 5 years ago

I'm having the same issue... Any provide a work-around yet?

tapasudenia commented 5 years ago

{"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 'CreateADForest'. Error message: \\"The DSC Extension failed to execute: Error downloading https://mystorageaccount.blob.core.windows.net/template-drop/0.1.0-mybranchName.1+134/ad-forest/DSC/CreateADRootDC1.ps1.zip after 29 attempts: The remote name could not be resolved: 'mystorageaccount.blob.core.windows.net'.\nMore information about the failure can be found in the logs located under 'C:\\WindowsAzure\\Logs\\Plugins\\Microsoft.Powershell.DSC\\2.77.0.0' on the VM.\\".\"\r\n }\r\n ]\r\n }\r\n}"}]}

I am getting the same error, any workaround or clue?

dasutton commented 5 years ago

Anyone have a work around for this problem? Getting this very same problem this week concerning the double // before Configuration.zip.

tapasudenia commented 5 years ago

So, this ARM template worked for me. Compare with yours and see if there is any difference.

{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

"contentVersion": "1.0.0.0",
"parameters": {
  "vmName": {
    "type": "string"
  },
  "adminUsername": {
    "type": "string"
  },
  "adminPassword": {
    "type": "securestring"
  },
  "domainName": {
    "type": "string"
  },
  "DnsForwarder": {
    "type": "string"
  },
  "mySasToken": {
    "type": "string",
    "metadata": {
    "description": "The SAS token required for the ."
          }
    }
},
"variables": {

  "adRootDC1ConfigurationFunction": "CreateADRootDC1.ps1\\CreateADRootDC1"
},
"resources": [
  {
    "name": "[concat(parameters('vmName'),'/CreateADForest')]",
    "type": "Microsoft.Compute/virtualMachines/extensions",
    "apiVersion": "2018-06-01",
    "location": "[resourceGroup().location]",
    "properties": {
      "publisher": "Microsoft.Powershell",
      "type": "DSC",
      "typeHandlerVersion": "2.21",
      "autoUpgradeMinorVersion": true,
      "settings": {
        "ModulesUrl": "[concat(uri(deployment().properties.templateLink.uri,'DSC/CreateADRootDC1.ps1.zip'),parameters('mySasToken'))]",
        "ConfigurationFunction": "[variables('adRootDC1ConfigurationFunction')]",
        "Properties": {
          "DomainName": "[parameters('domainName')]",
          "DnsForwarder": "[parameters('DnsForwarder')]",
          "AdminCreds": {
            "UserName": "[parameters('adminUserName')]",
            "Password": "PrivateSettingsRef:AdminPassword"
          }
        }
      },
      "protectedSettings": {
        "Items": {
          "AdminPassword": "[parameters('adminPassword')]"
        }
      }
    }
  }
],
"outputs": {}

}

dasutton commented 5 years ago

Thanks, but the sections of code that do not work for me are:

"variables": { "gwdnsLabelPrefix": "[toLower(concat('gwd', resourceGroup().name))]", "cbdnsLabelPrefix": "[toLower(concat('cbd', resourceGroup().name))]", "imagePublisher": "MicrosoftWindowsServer", "imageOffer": "WindowsServer", "dnsServerPrivateIp": "10.0.0.4", "subnet-id": "[concat(resourceId(parameters('adVnetRG'),'Microsoft.Network/virtualNetworks',parameters('adVnetName')),'/subnets/',parameters('adSubnetName'))]", "publicIpRef": "publicIp", "brokerIpRef": "brokerpublicIp", "gatewayIpRef": "gatewaypublicIp", "assetLocation": "https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment/"

And

"resources": [ { "apiVersion": "2015-06-15", "type": "Microsoft.Compute/virtualMachines/extensions", "name": "gw-vm/gateway", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Compute/virtualMachines', 'gw-vm')]" ], "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.11", "autoUpgradeMinorVersion": true, "settings": { "ModulesUrl": "[concat(variables('assetLocation'),'/Configuration.zip')]", "ConfigurationFunction": "Configuration.ps1\Gateway",

In the first code section, note assetLocation path. After the path there is a "/" and in the section code section before the zip file there is a "/" This produces https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip when everything runs.

I see some differences in yours, such as the DSC/filename.ps1.zip mention. I just don't know where your template is getting the full path to the file.


From: Tapas Udenia notifications@github.com Sent: Monday, April 29, 2019 3:40 PM To: Azure/azure-quickstart-templates Cc: Bryan Sutton; Comment Subject: Re: [Azure/azure-quickstart-templates] rds-deployment-existing-ad DSC failed Error downloading https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip (#5486)

So, this ARM template worked for me. Compare with yours and see if there is any difference.

{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fschema.management.azure.com%2Fschemas%2F2015-01-01%2FdeploymentTemplate.json%23&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C4e20118db994485574dc08d6ccda978a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=KZjGBYM4FHafgQvzgPw7AiMLNjI2G8VHdtOD65iD7Tk%3D&reserved=0",

"contentVersion": "1.0.0.0", "parameters": { "vmName": { "type": "string" }, "adminUsername": { "type": "string" }, "adminPassword": { "type": "securestring" }, "domainName": { "type": "string" }, "DnsForwarder": { "type": "string" }, "mySasToken": { "type": "string", "metadata": { "description": "The SAS token required for the ." } } }, "variables": {

"adRootDC1ConfigurationFunction": "CreateADRootDC1.ps1\CreateADRootDC1" }, "resources": [ { "name": "[concat(parameters('vmName'),'/CreateADForest')]", "type": "Microsoft.Compute/virtualMachines/extensions", "apiVersion": "2018-06-01", "location": "[resourceGroup().location]", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.21", "autoUpgradeMinorVersion": true, "settings": { "ModulesUrl": "[concat(uri(deployment().properties.templateLink.uri,'DSC/CreateADRootDC1.ps1.zip'),parameters('mySasToken'))]", "ConfigurationFunction": "[variables('adRootDC1ConfigurationFunction')]", "Properties": { "DomainName": "[parameters('domainName')]", "DnsForwarder": "[parameters('DnsForwarder')]", "AdminCreds": { "UserName": "[parameters('adminUserName')]", "Password": "PrivateSettingsRef:AdminPassword" } } }, "protectedSettings": { "Items": { "AdminPassword": "[parameters('adminPassword')]" } } } } ], "outputs": {}

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-quickstart-templates%2Fissues%2F5486%23issuecomment-487715573&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C4e20118db994485574dc08d6ccda978a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=YOUHLmkykwA87iihlCphlHcBcXCEBJF4X18VJvZYLes%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALZJTM23TQMIFPENAVEOSXLPS5FMLANCNFSM4GPAGINA&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C4e20118db994485574dc08d6ccda978a%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=wlYXkoR7CIUpVN%2FNw5slkXw1ucFvhsi72RU9p3Mb7zU%3D&reserved=0.

tapasudenia commented 5 years ago

So my template gets the path from the Azure Storage account BLOB. And this template gets invoked from the Azure DevOps CI/CD Pipeline. So remove the '/' if you don't have any other inner directory. So my path is template/ad-forest/DSC/CreateADRootDC1.ps1.zip

dasutton commented 5 years ago

Removing the extra "/" still produces the same error message. Changing the assetLocation path from raw.gitbhubusercontent.com to just GitHub.com also produces the same message. I also tried the IP address. Remote name could not be resolved.

I am going to try and load the Configuration.zip file in my Azure blob storage and reference that path versus GitHub.


From: Tapas Udenia notifications@github.com Sent: Monday, April 29, 2019 4:07 PM To: Azure/azure-quickstart-templates Cc: Bryan Sutton; Comment Subject: Re: [Azure/azure-quickstart-templates] rds-deployment-existing-ad DSC failed Error downloading https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip (#5486)

So my template gets the path from the Azure Storage account BLOB. And this template gets invoked from the Azure DevOps CI/CD Pipeline. So remove the '/' if you don't have any other inner directory. So my path is template/ad-forest/DSC/CreateADRootDC1.ps1.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-quickstart-templates%2Fissues%2F5486%23issuecomment-487723934&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C803d0297ca9643a7ef6708d6ccde4399%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=AF13j340op6%2BAGFXP2jbF5A%2Fv%2FicD3mz%2BJ13n6j2XwM%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALZJTM7JUVGBMF3EL4CYYU3PS5IO5ANCNFSM4GPAGINA&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C803d0297ca9643a7ef6708d6ccde4399%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=Hd9mp5WFI5tGSxJGTEv0R34Fp%2FPSFclP8TvJmFI%2FGDA%3D&reserved=0.

tapasudenia commented 5 years ago

Yes, that should definitely work, because in my case, the code below [concat(uri(deployment().properties.templateLink.uri,'DSC/CreateADRootDC1.ps1.zip'),parameters('mySasToken'))]

is fetching it from the Azure BLOB. I am just using template link to fetch it from the folder structure of my BLOB.

dasutton commented 5 years ago

Currently getting this now:

Managed disk storage account type change through Virtual Machine 'gw-vm' is not allowed. Please update disk resource at /subscriptions/----*/resourceGroups//providers/Microsoft.Compute/disks/gw_OSDisk.\",\r\n \"target\": \"osDisk.managedDisk.storageAccountType

Thought it was talking about Standard HDD versus Standard SSD. Not the case.

Thoughts?


From: Tapas Udenia notifications@github.com Sent: Tuesday, April 30, 2019 10:43 AM To: Azure/azure-quickstart-templates Cc: Bryan Sutton; Comment Subject: Re: [Azure/azure-quickstart-templates] rds-deployment-existing-ad DSC failed Error downloading https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment//Configuration.zip (#5486)

Yes, that should definitely work, because in my case, the code below [concat(uri(deployment().properties.templateLink.uri,'DSC/CreateADRootDC1.ps1.zip'),parameters('mySasToken'))]

is fetching it from the Azure BLOB. I am just using template link to fetch it from the folder structure of my BLOB.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fazure-quickstart-templates%2Fissues%2F5486%23issuecomment-487979926&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C183f756dad3b4be17dad08d6cd7a39e1%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=AjUtaD8dlL5Oy293jRzOXgT7nOxj%2Fc72y9Riq7yZ5aw%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALZJTM2CU3WZ7EK3UO5VPY3PTBLJPANCNFSM4GPAGINA&data=01%7C01%7CDavid.Sutton%40microsoft.com%7C183f756dad3b4be17dad08d6cd7a39e1%7C72f988bf86f141af91ab2d7cd011db47%7C1&sdata=OzWY%2FLwtJOXU0oxI7n%2BYHatDqQ5vDB1%2BDI3A2zbrCuk%3D&reserved=0.

tapasudenia commented 5 years ago

Can you paste your Virtual Machine 'gw-vm' json? And do you have a separate json for Storage account in your template?

dasutton commented 5 years ago

I figured that one out. It didn't like that the resource was already in place. Apparently the script (which I did not write) does not account for that. I was trying to redeploy after another error.

I am stuck though. Getting:

"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 'gateway'. Error message: \\"The DSC Extension failed to execute: Error downloading [https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment/Configuration.zip]https://raw.githubusercontent.com/Azure/azure-QuickStart-Templates/master/rds-deployment/Configuration.zip after 29 attempts: The remote name could not be resolved: 'raw.githubusercontent.com'.\n

Regardless of where the assetLocation path is set to (either GitHub or Azure Blob) getting this "The remote name could not be resolved:"

Original JSON : https://github.com/Azure/azure-quickstart-templates/blob/master/rds-deployment-existing-ad/azuredeploy.json

For my copy in my repo I only changed the assetLocation to point to my storage account path in Azure. I can do a NSLookup to my storage path. Same error message as above though.

robdyke commented 5 years ago

@dasutton @rstamp see my reply to #6094

You need to edit "dnsServerPrivateIp": "10.0.0.4", in azuredeploy.json line 105.