question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't deploy Linux web app

See original GitHub issue

The following template generates a Linux ARM template that is invalid:

let template =
    let myWebApp = webApp {
        name "mysuperwebappisaac"
        sku WebApp.Sku.F1
        operating_system Linux
        runtime_stack DotNetCore22
    }

    arm {
        location NorthEurope
        add_resource myWebApp
    }

The service host is deployed, but the web app is not, with an error that the LinuxFxVersion is invalid (in the generated template it’s DOTNETCORE|2.2).

What do you think this is @Dzoukr ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
isaacabrahamcommented, Feb 22, 2020

@viktorvan @Dzoukr an you both check now? I’ve made some changes to the template generation which I think are now working. Not yet released but it’s in master

1reaction
Dzoukrcommented, Nov 9, 2019

Hi @isaacabraham,

prepare for a good laugh. I tried and failed with the same error. Then I tried to create a same configuration manually and copy some parts to locally generated ARM template. After some desperate guesses, I realized that output for Microsoft.Web/serverfarms is slightly different.

Our output:

{
  "apiVersion": "2018-02-01",
  "kind": "linux",
  "location": "northeurope",
  "name": "mysuperwebapproman-plan",
  "properties": {
	"name": "mysuperwebapproman-plan",
	"perSiteScaling": false,
	"reserved": false
  },
  "sku": {
	"capacity": 1,
	"name": "F1",
	"size": "0",
	"tier": "Free"
  },
  "type": "Microsoft.Web/serverfarms"
}

the portal template (manual clicked resource) output:

{
  "apiVersion": "2018-11-01",
  "name": "mysuperwebapproman-plan",
  "type": "Microsoft.Web/serverfarms",
  "location": "northeurope",
  "kind": "linux",
  "tags": null,
  "dependsOn": [],
  "properties": {
	"name": "mysuperwebapproman-plan",
	"workerSize": "0",
	"workerSizeId": "0",
	"numberOfWorkers": "1",
	"reserved": true,
	"hostingEnvironment": ""
  },
  "sku": {
	"Tier": "Free",
	"Name": "F1"
  }
}

The second one sort of works - returns bad request but at least creates resource on Azure. I tried to investigate (= change randomly things and pray) and realized, that deleting section resources from webApp section containing

"resources": [
	{
	  "apiVersion": "2016-08-01",
	  "dependsOn": [
		"mysuperwebapproman"
	  ],
	  "name": "Microsoft.ApplicationInsights.AzureWebSites",
	  "properties": {},
	  "type": "siteextensions"
	}
]

will make it 100% work.

So here is the investigation summary:

  1. apiVersion is now 2018-11-01
  2. Sku properties for Microsoft.Web/serverfarms now with first letter uppercase make it work. Why? Only God and Microsoft know.
  3. Having AI site extension in resources array for Microsoft.Web/sites will make it fail.
  4. And just to make it more fun - everything works when you choose Windows OS.

(╯°□°)╯︵ ┻━┻

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to web deploy to Linux App Service from Visual ...
I have an ASP.NET Core 3.1 MVC application that I am trying to web deploy to a Linux App Service on Azure. When...
Read more >
Unable to web deploy to Linux App Service from Visual ...
I have an ASP.NET Core 3.1 MVC application that I am trying to web deploy to a Linux App Service on Azure. When...
Read more >
Unable to run sample Web Application in Azure App ...
I've been having trouble for the past several days deploying an example Java application in AppService on a Linux environment using Tomcat.
Read more >
Cannot deploy to Azure App Service Linux (Can't open lib ...
Currently I'm no longer unable to deploy my Django (4.0.x) app to Azure ... Cannot deploy to Azure App Service Linux (Can't open...
Read more >
unable to deploy v9 site to linux web app on azure
Hi, we are trying to deploy our v9 umbraco 9 site to a linux web app on Azure and we are getting an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found