Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

New-AzureRmWebAppSlot returns an error "The parameter javaVersion has an invalid value" #8907

Closed RoshanKumarMicrosoft closed 5 years ago

RoshanKumarMicrosoft commented 5 years ago

New-AzureRmWebAppSlot returns an error "The parameter javaVersion has an invalid value"

Cmdlets we are running : New-AzureRmWebAppSlot -Name L2JavaLinuxAppJupiter -ResourceGroupName L2TestAppServiceRG -Slot kvfgpwjj

We are using AzureRm Module 6.7.0 : C:\Modules\azurerm_6.7.0 I also tried by passing AppServicePlan parameters but we are getting same error.

In past this was working fine. Have we done any changes recently ? Can you please look into it?

Debug Log

https://management.azure.com/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/L2TestAppServiceRG/provi
ders/Microsoft.Web/sites/L2JavaLinuxAppJupiter/slots/kvfgpwjj?api-version=2018-02-01

Headers:
x-ms-client-request-id        : 2e644699-aab2-42b0-8c31-efd0bdf72702
accept-language               : en-US

Body:
{
  "properties": {
    "serverFarmId": "L2JavaLinuxAppPlan"
  },
  "location": "North Europe"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Pragma                        : no-cache
Strict-Transport-Security     : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-resource-requests: 499
x-ms-request-id               : f09dc409-910b-4fbc-9289-498f506b89e8
x-ms-correlation-request-id   : f09dc409-910b-4fbc-9289-498f506b89e8
x-ms-routing-request-id       : WESTINDIA:20190401T095150Z:f09dc409-910b-4fbc-9289-498f506b89e8
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Mon, 01 Apr 2019 09:51:50 GMT
ETag                          : "1D4E619A5A7DE80"
Server                        : Microsoft-IIS/10.0
X-AspNet-Version              : 4.0.30319
X-Powered-By                  : ASP.NET

Body:
{
  "Code": "BadRequest",
  "Message": "The parameter javaVersion has an invalid value.",
  "Target": null,
  "Details": [
    {
      "Message": "The parameter javaVersion has an invalid value."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "01007",
        "MessageTemplate": "The parameter {0} has an invalid value.",
        "Parameters": [
          "javaVersion"
        ],
        "Code": "BadRequest",
        "Message": "The parameter javaVersion has an invalid value."
      }
    }
  ],
  "Innererror": null
}
cormacpayne commented 5 years ago

@panchagnula Hey Sisira, would you mind taking a look at this issue?

panchagnula commented 5 years ago

@vinisoto looks like we have a backend regression here with Ant81 I believe? are there are any work arounds for mitigation here? Thanks!

panchagnula commented 5 years ago

@RoshanKumarMicrosoft - looks like you hit this because of an ongoing platform deployment, which caused a mismatch in an API . Please re-try & let us know if you still see this.

ernesto-arm commented 5 years ago

Hi, I'm starting to get this problem too. For a linux Java SE web application deployed by the azure-webapp-maven-plugin 1.4.0 I tried to update to 1.5.3 and still getting the error.

panchagnula commented 5 years ago

@ernesto-arm the deployment on our scale units is still in progress as per the team all deployment will complete on 4/4 EOD (PST), the work around suggested was to use pick an older version of Java if possible.

tanay1307shah commented 5 years ago

@panchagnula Hello, I have a web-app as well an till now it was working correctly but just recently i an just getting this errors..

Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.5.3:deploy (default-cli) on project Server: Status code 400, {"Code":"BadRequest","Message":"The parameter javaVersion has an invalid value.","Target":null,"Details":[{"Message":"The parameter javaVersion has an invalid value."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01007","MessageTemplate":"The parameter {0} has an invalid value.","Parameters":["javaVersion"],"Code":"BadRequest","Message":"The parameter javaVersion has an invalid value."}}],"Innererror":null}

and it is happening on com.microsoft.azure:azure-webapp-maven-plugin:1.4.0 as well, it there a workaround or a way to resolve this issue?

arjundg-vialto commented 5 years ago

We are facing this issue with an Azure Web App - Java 8 + Tomcat. We are not able to deploy the application. Not able to set IP restriction, error is - Edit IP Restriction Failed.: The parameter javaVersion has an invalid value. "properties": { "statusCode": "BadRequest", "serviceRequestId": null, "statusMessage": "{\"Code\":\"BadRequest\",\"Message\":\"The parameter javaVersion has an invalid value.\",\"Target\":null,\"Details\":[{\"Message\":\"The parameter javaVersion has an invalid value.\"},{\"Code\":\"BadRequest\"},{\"ErrorEntity\":{\"ExtendedCode\":\"01007\",\"MessageTemplate\":\"The parameter {0} has an invalid value.\",\"Parameters\":[\"javaVersion\"],\"Code\":\"BadRequest\",\"Message\":\"The parameter javaVersion has an invalid value.\"}}],\"Innererror\":null}" }

Please fix this issue ASAP or provide a workaround.

panchagnula commented 5 years ago

We have a regression on our API end during deployment that is still causing this - below is the update from the feature crew on this. The current ETA is 4/8

Issue description: Customers deploying or updating settings of Java sites on Linux (either new or updated sites) using Maven Plugin, PowerShell or the Application settings (classic) blade in the portal will receive an error message:

{"Code":"BadRequest","Message":"The parameter javaVersion has an invalid value.","Target":null,"Details":[{"Message":"The parameter javaVersion has an invalid value."},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"01007","MessageTemplate":"The parameter {0} has an invalid value.","Parameters":["javaVersion"],"Code":"BadRequest","Message":"The parameter javaVersion has an invalid value."}}],"

Customer impact: All Java on Linux customers that use any experience/tool that relies on first getting the site config and use the result to update the site config back will be impacted when trying to deploy/update their sites.

These tools include but are not limited to: Maven Plugin, PowerShell, Application settings (classic) blade

Potential root cause: There is a regression in the site config API that incorrectly sends back populated values in the javaContainer and javaContainerVersion when retrieving the site config even though they are (and remain) empty in the config database. When these values are passed back to update the site config, a validation fails.

Customer facing mitigation: Customer can use WAR deploy (https://docs.microsoft.com/en-us/azure/app-service/deploy-zip#deploy-war-file) to update content or the new “Configuration” blade in the portal or manually craft an ARM request that doesn’t include javaContainer and javaContainerVersion properties since theyshould be sent empty for Linux sites.

chperich commented 5 years ago

We are still running to this failure. Any update on when the fix might be available?

panchagnula commented 5 years ago

@chperich ,This issue was hotfixed earlier this week - can you please re-run & check. Thank you.

arjundg-vialto commented 5 years ago

It is fixed for me.

RoshanKumarMicrosoft commented 5 years ago

We are still facing same issue

panchagnula commented 5 years ago

@RoshanKumarMicrosoft the root cause of this issue has already been fixed. One thing to try is use resources.azure.com directly or portal to see if you face the same problem. If you are still seeing this can you please file a CRI on the AppService team & servicing folks will take a look.

panchagnula commented 5 years ago

Closing this since the backend changes from our end are complete & we are not expecting this to be an issue anymore. Thanks!

vincent1173 commented 5 years ago

@panchagnula Command: New-AzureRmWebAppSlot -Name L2JavaLinuxAppJupiter -ResourceGroupName L2TestAppServiceRG -Slot demo1 -Verbose -Debug throws below error

{
  "Code": "BadRequest",
  "Message": "The parameter javaVersion has an invalid value.",
  "Target": null,
  "Details": [
    {
      "Message": "The parameter javaVersion has an invalid value."
    },
    {
      "Code": "BadRequest"
    },
    {
      "ErrorEntity": {
        "ExtendedCode": "01007",
        "MessageTemplate": "The parameter {0} has an invalid value.",
        "Parameters": [
          "javaVersion"
        ],
        "Code": "BadRequest",
        "Message": "The parameter javaVersion has an invalid value."
      }
    }
  ],
  "Innererror": null
}
panchagnula commented 5 years ago

@vincentdass passed the error to the Java team - they are looking into this.

panchagnula commented 5 years ago

A fix for this has been checked in & batch deployment is in progress & current ETA for completion is 7/1