I just started getting this failure, not sure why; it was working fine yesterday. I only changed the appsettings and connectionstrings to be part or resources instead of the webapp to move the dependsOn down the chain. Previously, the site was dependsOn the dependencies for app settings and connection strings. Here is the ARM template for the website resource.
{
"comments": "Primary web app deployment.",
"name": "[variables('webAppName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"kind": "app",
"location": "[variables('rgLocation')]",
"tags": {},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('planName'))]"
],
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(variables('webAppName'), '.azurewebsites.net')]",
"sslState": "Disabled"
},
{
"name": "[concat(variables('webAppName'), '.scm.azurewebsites.net')]",
"sslState": "Disabled"
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('planName'))]",
"siteConfig": {
"numberOfWorkers": 1,
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.6",
"phpVersion": "",
"pythonVersion": "",
"nodeVersion": "",
"linuxFxVersion": "",
"requestTracingEnabled": false,
"remoteDebuggingEnabled": false,
"remoteDebuggingVersion": "VS2015",
"httpLoggingEnabled": false,
"logsDirectorySizeLimit": 35,
"detailedErrorLoggingEnabled": false,
"scmType": "None",
"use32BitWorkerProcess": false,
"webSocketsEnabled": false,
"alwaysOn": true,
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\\wwwroot",
"preloadEnabled": false
}
],
"autoHealEnabled": false,
"vnetName": ""
},
"microService": "WebSites",
"clientAffinityEnabled": false,
"clientCertEnabled": false,
"hostNamesDisabled": false
},
"resources": [
{
"name": "appsettings",
"type": "config",
"apiVersion":"2015-08-01",
"dependsOn":[
"[resourceId('Microsoft.Web/sites', variables('webAppName'))]",
"[resourceId('microsoft.insights/components', variables('insightsName'))]"
],
"properties": {
"APPINSIGHTS_INSTRUMENTATIONKEY":"[reference(resourceId('Microsoft.Insights/components', variables('insightsName')), '2015-05-01').InstrumentationKey]",
"UseAzureStorageEmulator": "false"
}
},
{
"name": "connectionstrings",
"type": "config",
"apiVersion":"2015-08-01",
"dependsOn":[
"[resourceId('Microsoft.Web/sites', variables('webAppName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('genStorageName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('jobStorageName'))]"
],
"properties": {
"AzureStorage": {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('genStorageName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('genStorageName')), '2017-06-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
"type": "Custom"
},
"AzureWebJobsDashboard" : {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('jobStorageName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('jobStorageName')), '2017-06-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
"type": "Custom"
},
"AzureWebJobsStorage" : {
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('jobStorageName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('jobStorageName')), '2017-06-01').keys[0].value, ';EndpointSuffix=core.windows.net')]",
"type": "Custom"
}
}
},
{
"apiVersion":"2015-08-01",
"name": "Microsoft.ApplicationInsights.AzureWebSites",
"type": "siteextensions",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('webAppName'))]"
],
"properties": {}
}
]
}
And the error I'm getting...
STATUS Conflict
PROVISIONING STATE Failed
TIMESTAMP7/14/2017, 10:40:23 AM
DURATION 1 minute 46 seconds
TYPE Microsoft.Web/sites/siteextensions
RESOURCE ID /subscriptions/.../providers/Microsoft.Web/sites/.../siteextensions/Microsoft.ApplicationInsights.AzureWebSites
STATUSMESSAGE{
"status": "Canceled",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Canceled'."
}
}
Even with the error, it actually did install the extension correctly. During another test, it installed the extension, but when I opened it, the App Insights Profiler web job was not installed. Either way, not sure why there is a conflict. When I open the log in Kudu, there is pretty much nothing inside.
7/14/2017 2:44:38 PM: [Verbose] Starting Application Insights installation and configuration...
7/14/2017 2:44:38 PM: [Verbose] Loading assembly from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Microsoft.ApplicationInsights.WebSiteManager.dll
7/14/2017 2:44:39 PM: [Verbose] No web.config detected. The web app may be empty. Assume classic ASP.NET by default.
That's the entirety of the log.
On a previous test...
7/13/2017 6:15:44 PM: [Verbose] Starting Application Insights installation and configuration...
7/13/2017 6:15:44 PM: [Verbose] Loading assembly from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\Microsoft.ApplicationInsights.WebSiteManager.dll
7/13/2017 6:15:44 PM: [Verbose] No web.config detected. The web app may be empty. Assume classic ASP.NET by default.
Same start of the file, but there are more entries. There is definitely a web config and the app is working so not sure what that's about.
7/13/2017 6:15:50 PM: [Verbose] Application is not instrumented with Application Insights.
7/13/2017 6:15:50 PM: [Verbose] Starting to download/install 'Microsoft.ApplicationInsights.Azure.WebSites' nuget package from D:\home\SiteExtensions\Microsoft.ApplicationInsights.AzureWebSites\appinsights...
7/13/2017 6:15:52 PM, [Verbose] Installing 'Microsoft.ApplicationInsights', version '2.3.0' ...
7/13/2017 6:15:53 PM, [Verbose] Installed 'Microsoft.ApplicationInsights', version '2.3.0'.
The app is definitely instrumented and uses version 2.4 which is newer than 2.3 which was installed.