How to fix a problem - parameter LinuxFxVersion has an invalid value for web application during deployment

Kostiantyn Medintsev 20 Reputation points
2024-05-07T18:20:50.86+00:00

Hi, I'm trying to deploy application from git -> https://github.com/cadullms/simplegreet. It's Java-based project.

Simplegreet git-project has a config file. It's simplegreet/template/webapp-sql.json. The config contains LinuxFxVersion property with value "TOMCAT|8.5-jre8". The value was changed to "Java|8" as I haven't found the value in the available list. The following command was used to get list of available LinuxFxVersion values-> az functionapp list-runtimes --os linux --query "[].{stack:join(' ', [runtime, version]), LinuxFxVersion:linux_fx_version, SupportedFunctionsVersions:to_string(supported_functions_versions[])}" --output table
To start the deployemnt the follow command was used in Azure Bash terminal -> az group deployment create -g Dev_RG --template-file simplegreet/template/webapp-sql.json --parameters '{"name":{"value":"potato-dev1"}}' --no-wait
During deployment the error occurs ->

The parameter LinuxFxVersion has an invalid value

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,679 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,407 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 19,646 Reputation points Microsoft Employee
    2024-05-08T07:33:19.9266667+00:00

    @Kostiantyn Medintsev Thank you for posting your question in Microsoft Q&A, apologize for the inconvenience caused on this.

    I have reviewed the arm template present in the share GitHub repo and I understand that you are trying to deploy an app service+ Sql database.

    Here are the couple of observations:

    • TOMCAT|8.5-jre8 is a valid LinuxFxVersion for Linux app service. If you want to deploy your application on Linux app service plan, then you need to add another property reserved: true under resource block of app service plan (Microsoft.web/serverfarms). Also, you can refer to this sample arm template to deploy .NET app on Linux app service plan.
    • If you want to see the list of supported runtime versions for app service then you need to use the below cmdlet instead of az functionapp list-runtimes.
    az webapp list-runtimes
    
    • If you want to deploy your application to windows-based app service, then please refer to sample GitHub template here and modify the existing accordingly.
    • Also, if you want to deploy your application to function app then by referring to the sample here and make the changes to existing template.

    Hope this helps, let me know if you have any further questions on this.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Sreeju Nair 12,176 Reputation points
    2024-05-08T07:30:34.5166667+00:00

    Make sure, your App Service plan is Linux, not Windows. If it is Windows, change your app service plan to Linux.

    If you are in Linux environment, and still facing the issue, look into the provided value. I believe it is case sensitive, and you are using Java, that might be a problem. However, you may find the valid LinuxFxVersion using the steps mentioned in the following learn article.

    https://learn.microsoft.com/en-gb/azure/azure-functions/functions-app-settings#valid-linuxfxversion-values

    Hope this helps

    1 person found this answer helpful.
    0 comments No comments