Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3.01k forks source link

Zip deployment to Azure App Service fails with timeout - scm is not responding? #29562

Open JoeMarkov opened 4 months ago

JoeMarkov commented 4 months ago

Describe the bug

I try to create a plain simple powershell script to ZIP-deploy a Linux ASP.NET Core 8 application.

I have created the following test script that tries to deploy a .ZIP file '../publish/publish-linux.zip'.

My problem is that when I run this script (nothing exists before) then the deployment hangs on this statement:

DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): mytestservice987654.scm.azurewebsites.net:443

And I eventually end up with this error

Error: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment

ERROR: cli.azure.cli.core.azclierror: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment
ERROR: az_command_data_logger: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0000018964E7C400>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 246.901 seconds (init: 0.510, invoke: 246.390)

ie, SCM is not responding.

Currently, it works if I call the az webapp deploy command twice, resulting in this output:

az webapp deploy #1 WARNING: Initiating deployment WARNING: Deploying from local path: ../publish/publish-linux.zip ERROR: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment az webapp deploy #2 WARNING: Initiating deployment WARNING: Deploying from local path: ../publish/publish-linux.zip WARNING: Deployment has completed successfully WARNING: You can visit your app at: http://mytestservice987654.azurewebsites.net

but that feels like an ugly hack.

I also tried to make a HTTP request to the SCM after creation to "trigger" it , but that did not work.

I was looking at the WEBSITE_START_SCM_ON_SITE_CREATION, but that one can't be set using the Azure CLI commands.

I would like to know what is the correct way to do deployment, to avoid doing ugly hacks and other things to get it to work.

Is my script not supposed to work?

The .ZIP file I try to deploy is about 15MB in size.

Related command

az webapp create

Errors

Error: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment

ERROR: cli.azure.cli.core.azclierror: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice987654.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment

Issue script & Debug output

$rgname = 'rgtest3'
$location = 'swedencentral'
$AppServicePlan_linux = 'testplan'
$AppServicePlanSKU_Linux = 'S1'
$AppServiceName_linux = 'mytestservice987654'
$zipFolder = '../publish'

Write-Host "az group create"
$resGroup = az group create --name $rgname --location $location

Write-Host "az appservice plan create"
$servicePlan = az appservice plan create --name $AppServicePlan_linux `
                                         --resource-group $rgname `
                                         --is-linux `
                                         --sku $AppServicePlanSKU_Linux `
                                         --output json | ConvertFrom-Json

$servicePlan 

Write-Host "az webapp create"
$AppService = az webapp create --name $AppServiceName_linux `
                                        --plan $AppServicePlan_linux `
                                        --resource-group $rgname `
                                        --runtime 'DOTNETCORE:8.0' `
                                        --output json | ConvertFrom-Json

$AppService
$hostName = $AppService.defaultHostName

Write-Host "az webapp deploy"
$deployResult = az webapp deploy --resource-group $rgname `
                                 --name $AppServiceName_linux `
                                 --type zip `
                                 --clean true `
                                 --restart true `
                                 --src-path '../publish/publish-linux.zip' `
                                 --async true `
                                 --track-status false `
                                 --verbose --debug `
                                 --output json | ConvertFrom-Json

$deployResult

Write-Host "`n`nLinux App Service hostname: https://${hostName}`n`n" -ForegroundColor Green

###################################################################################
My Log

PS Z:\GitHubTN\AzureRover\AzureDeploymentScripts> .\Test.ps1
az group create
az appservice plan create
WARNING: Readonly attribute name will be ignored in class <class 'azure.mgmt.web.v2023_01_01.models._models_py3.AppServicePlan'>
←[K - Starting ..
elasticScaleEnabled       : False
extendedLocation          :
freeOfferExpirationTime   :
geoRegion                 : Sweden Central
hostingEnvironmentProfile :
hyperV                    : False
id                        : /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/serverfarms/testplan
isSpot                    : False
isXenon                   : False
kind                      : linux
kubeEnvironmentProfile    :
location                  : swedencentral
maximumElasticWorkerCount : 1
maximumNumberOfWorkers    : 0
name                      : testplan
numberOfSites             : 0
numberOfWorkers           : 1
perSiteScaling            : False
provisioningState         : Succeeded
reserved                  : True
resourceGroup             : rgtest7
sku                       : @{capabilities=; capacity=1; family=S; locations=; name=S1; size=S1; skuCapacity=; tier=Standard}
spotExpirationTime        :
status                    : Ready
subscription              : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
tags                      :
targetWorkerCount         : 0
targetWorkerSizeId        : 0
type                      : Microsoft.Web/serverfarms
workerTierName            :
zoneRedundant             : False

az webapp create
DEBUG: cli.knack.cli: Command arguments: ['webapp', 'create', '--name', 'mytestservice552', '--plan', 'testplan', '--resource-group', 'rgtest7', '--runtime', 'DOTNETCORE:8.0', '--debug', '--output', 'json']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000002095B0BB880>, <function OutputProducer.on_global_arguments at 0x000002095B2460C0>, <function CLIQuery.on_global_arguments at 0x000002095B273C40>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: appservice                0.775        79       270
DEBUG: cli.azure.cli.core: serviceconnector          0.079        20       307
DEBUG: cli.azure.cli.core: Total (2)                 0.853        99       577
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: Total (0)                 0.000         0         0
DEBUG: cli.azure.cli.core: Loaded 97 groups, 577 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : webapp create
DEBUG: cli.azure.cli.core: Command table: webapp create
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000002095E13C180>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\xxxx\.azure\commands\2024-07-31.13-30-16.webapp_create.30376.log'.
INFO: az_command_data_logger: command args: webapp create --name {} --plan {} --resource-group {} --runtime {} --debug --output {}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x000002095E168900>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x000002095E18E5C0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x000002095E18E700>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002095B246160>, <function CLIQuery.handle_query_parameter at 0x000002095B273CE0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x000002095E18E660>]
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\xxxx\\.azure\\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: C:\Users\xxxx\.azure\msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/567d82a1-7f61-4da2-b955-d3244ea6e976
DEBUG: msal.application: Broker enabled? True
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: b16a29ef-b0b2-4673-95b4-174c91a54b6c
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/serverfarms/testplan?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '41c42e2d-4f30-11ef-aeb9-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --plan --resource-group --runtime --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/serverfarms/testplan?api-version=2023-01-01 HTTP/1.1" 200 1496
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '1496'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '728858b9-54af-4fbe-aacf-0fd8f127093d'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '6aca63dd-3314-4149-8c14-f2d01da746e5'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENSOUTH:20240731T113016Z:6aca63dd-3314-4149-8c14-f2d01da746e5'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 2052FEFC5D714EEF9CEF9665321D0E80 Ref B: FRA231050413045 Ref C: 2024-07-31T11:30:16Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:16 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/567d82a1-7f61-4da2-b955-d3244ea6e976
DEBUG: msal.application: Broker enabled? True
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
DEBUG: msal.application: Broker enabled? True
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 436d3eee-6e97-484d-a3d3-05de37ffce0f
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Web/checknameavailability?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'POST'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '44'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '41c42e2d-4f30-11ef-aeb9-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --plan --resource-group --runtime --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"name": "mytestservice552", "type": "Site"}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Web/checknameavailability?api-version=2023-01-01 HTTP/1.1" 200 47
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '47'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'a6ff87ce-4635-40eb-b154-0d3f68e2cc2f'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '2d5c8c14-5a3e-4209-898d-bd893e7e9a6b'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113017Z:2d5c8c14-5a3e-4209-898d-bd893e7e9a6b'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: CD9B5A3B59B4457A8BD6BA4E612E6527 Ref B: FRA231050412033 Ref C: 2024-07-31T11:30:16Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:16 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: {"nameAvailable":true,"reason":"","message":""}
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 3402c308-35f3-41af-9624-ccd4f1e6d4e6
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/providers/Microsoft.Web/webAppStacks?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '41c42e2d-4f30-11ef-aeb9-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --plan --resource-group --runtime --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /providers/Microsoft.Web/webAppStacks?api-version=2023-01-01 HTTP/1.1" 200 87900
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '87900'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '384dc491-24b1-4446-9cc9-b0daea50faa3'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-tenant-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '03abc57f-11fe-4370-81ba-6b1d3203f72f'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENSOUTH:20240731T113017Z:03abc57f-11fe-4370-81ba-6b1d3203f72f'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 6FA64C3750474753A503CA1AA40DBF10 Ref B: FRA231050413029 Ref C: 2024-07-31T11:30:17Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:17 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'PUT'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '459'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '41c42e2d-4f30-11ef-aeb9-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --plan --resource-group --runtime --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '7374'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'ETag': '"1DAE33D06B5B715"'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'c5ebace4-2252-4317-8204-34e11b199f2d'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-resource-requests': '499'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'c705a193-c5fd-4560-970b-a66db89d5d6a'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENSOUTH:20240731T113041Z:c705a193-c5fd-4560-970b-a66db89d5d6a'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: FDBDBAF4239D4EB29430A57698179CBC Ref B: FRA231050413045 Ref C: 2024-07-31T11:30:18Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:40 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/publishxml?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'POST'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '23'
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/xml'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '41c42e2d-4f30-11ef-aeb9-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp create'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --plan --resource-group --runtime --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: {"format": "WebDeploy"}
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/publishxml?api-version=2023-01-01 HTTP/1.1" 200 1564
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '1564'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/xml'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-resource-requests': '11999'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '388ba40f-4ae6-457c-982d-29df3d165b59'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '388ba40f-4ae6-457c-982d-29df3d165b59'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113041Z:388ba40f-4ae6-457c-982d-29df3d165b59'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: A79F93964E184A9BBEE2B3077E262439 Ref B: FRA231050415049 Ref C: 2024-07-31T11:30:41Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:41 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.sdk.policies: Body is streamable
DEBUG: cli.knack.cli: Event: CommandInvoker.OnTransformResult [<function _resource_group_transform at 0x000002095E16B7E0>, <function _x509_from_base64_to_hex_transform at 0x000002095E16B880>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnFilterResult []
DEBUG: cli.knack.cli: Event: Cli.SuccessfulExecute []
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000002095E13C400>]
INFO: az_command_data_logger: exit code: 0
INFO: cli.__main__: Command ran in 27.571 seconds (init: 0.467, invoke: 27.104)
az webapp deploy #1
DEBUG: cli.knack.cli: Command arguments: ['webapp', 'deploy', '--resource-group', 'rgtest7', '--name', 'mytestservice552', '--type', 'zip', '--clean', 'true', '--restart', 'true', '--src-path', '../publish/publish-linux.zip', '--async', 'true', '--track-status', 'false', '--debug', '--output', 'json']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001A26FFCB880>, <function OutputProducer.on_global_arguments at 0x000001A2701560C0>, <function CLIQuery.on_global_arguments at 0x000001A270183C40>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'webapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: appservice                0.680        79       270
DEBUG: cli.azure.cli.core: serviceconnector          0.072        20       307
DEBUG: cli.azure.cli.core: Total (2)                 0.752        99       577
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: Total (0)                 0.000         0         0
DEBUG: cli.azure.cli.core: Loaded 97 groups, 577 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : webapp deploy
DEBUG: cli.azure.cli.core: Command table: webapp deploy
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001A2730DC180>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\xxxx\.azure\commands\2024-07-31.13-30-43.webapp_deploy.30936.log'.
INFO: az_command_data_logger: command args: webapp deploy --resource-group {} --name {} --type {} --clean {} --restart {} --src-path {} --async {} --track-status {} --debug --output {}
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x000001A273108900>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x000001A27312A5C0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x000001A27312A700>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001A270156160>, <function CLIQuery.handle_query_parameter at 0x000001A270183CE0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x000001A27312A660>]
WARNING: cli.azure.cli.command_modules.appservice.custom: Initiating deployment
WARNING: cli.azure.cli.command_modules.appservice.custom: Deploying from local path: ../publish/publish-linux.zip
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\xxxx\\.azure\\msal_token_cache.bin', encrypt=True
DEBUG: cli.azure.cli.core.auth.binary_cache: load: C:\Users\xxxx\.azure\msal_http_cache.bin
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/567d82a1-7f61-4da2-b955-d3244ea6e976
DEBUG: msal.application: Broker enabled? True
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: e1af3353-9a65-4775-976b-109a3e045840
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '52492cda-4f30-11ef-bf98-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp deploy'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01 HTTP/1.1" 200 7182
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '7182'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'ETag': '"1DAE33D06B5B715"'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'b9e7ea0f-0184-4865-831e-d3ad8e2caf07'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'aaf1bb85-5df6-491a-a94e-dffed6e91c96'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113044Z:aaf1bb85-5df6-491a-a94e-dffed6e91c96'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 145B59460EC44F21840C6E564E8CD284 Ref B: FRA231050415019 Ref C: 2024-07-31T11:30:43Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:43 GMT'
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 0ff6a4c1-c01a-4268-8445-0c72d2037fd9
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '52492cda-4f30-11ef-bf98-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp deploy'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01 HTTP/1.1" 200 7182
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '7182'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'ETag': '"1DAE33D06B5B715"'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'a543c18c-7597-4aee-9ec5-efd51bc17d04'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '7ce429ee-b9a1-4a31-80a8-67696d2f784a'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113044Z:7ce429ee-b9a1-4a31-80a8-67696d2f784a'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 79D213C624344CDBAB394AFC4F46157D Ref B: FRA231050415023 Ref C: 2024-07-31T11:30:44Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:44 GMT'
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: c2da9669-1744-4fdc-b872-8c20778b86be
INFO: cli.azure.cli.core.util: Request URL: 'https://management.azure.com//subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-12-01'
INFO: cli.azure.cli.core.util: Request method: 'GET'
INFO: cli.azure.cli.core.util: Request headers:
INFO: cli.azure.cli.core.util:     'User-Agent': 'python/3.11.8 (Windows-10-10.0.19045-SP0) AZURECLI/2.62.0 (MSI)'
INFO: cli.azure.cli.core.util:     'Accept-Encoding': 'gzip, deflate'
INFO: cli.azure.cli.core.util:     'Accept': '*/*'
INFO: cli.azure.cli.core.util:     'Connection': 'keep-alive'
INFO: cli.azure.cli.core.util:     'x-ms-client-request-id': '0a2dbedc-3014-4c48-a83f-815c23dc2271'
INFO: cli.azure.cli.core.util:     'CommandName': 'webapp deploy'
INFO: cli.azure.cli.core.util:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
INFO: cli.azure.cli.core.util:     'Authorization': 'Bearer eyJ0eXAiOiJKV...'
INFO: cli.azure.cli.core.util: Request body:
INFO: cli.azure.cli.core.util: None
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-12-01 HTTP/1.1" 200 7182
INFO: cli.azure.cli.core.util: Response status: 200
INFO: cli.azure.cli.core.util: Response headers:
INFO: cli.azure.cli.core.util:     'Cache-Control': 'no-cache'
INFO: cli.azure.cli.core.util:     'Pragma': 'no-cache'
INFO: cli.azure.cli.core.util:     'Content-Length': '7182'
INFO: cli.azure.cli.core.util:     'Content-Type': 'application/json'
INFO: cli.azure.cli.core.util:     'Expires': '-1'
INFO: cli.azure.cli.core.util:     'ETag': '"1DAE33D06B5B715"'
INFO: cli.azure.cli.core.util:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
INFO: cli.azure.cli.core.util:     'x-ms-request-id': '03db5226-4a93-452f-9156-d554b36fc061'
INFO: cli.azure.cli.core.util:     'X-AspNet-Version': '4.0.30319'
INFO: cli.azure.cli.core.util:     'X-Powered-By': 'ASP.NET'
INFO: cli.azure.cli.core.util:     'x-ms-ratelimit-remaining-subscription-reads': '249'
INFO: cli.azure.cli.core.util:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
INFO: cli.azure.cli.core.util:     'x-ms-correlation-request-id': '30cf7950-6f03-4f0d-8983-56f8510a743b'
INFO: cli.azure.cli.core.util:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113045Z:30cf7950-6f03-4f0d-8983-56f8510a743b'
INFO: cli.azure.cli.core.util:     'X-Content-Type-Options': 'nosniff'
INFO: cli.azure.cli.core.util:     'X-Cache': 'CONFIG_NOCACHE'
INFO: cli.azure.cli.core.util:     'X-MSEdge-Ref': 'Ref A: D0ED2528A3FB4FAF920E9C6597A40346 Ref B: FRA231050412033 Ref C: 2024-07-31T11:30:44Z'
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 968efa4e-4f1a-44c6-86f5-7aa0af43e68c
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/basicPublishingCredentialsPolicies/scm?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '52492cda-4f30-11ef-bf98-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp deploy'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/basicPublishingCredentialsPolicies/scm?api-version=2023-01-01 HTTP/1.1" 200 302
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '302'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'b94ca1f3-1668-4bed-9aa0-df223057478f'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'b347b548-a9e8-4cbd-ba4b-c5093afa71b0'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113045Z:b347b548-a9e8-4cbd-ba4b-c5093afa71b0'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: A0D65CC15ADB45C5BFBB1C716B28AC2D Ref B: FRA231050411035 Ref C: 2024-07-31T11:30:45Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 1bc8c992-b0a3-407c-830d-8eb30f9afb09
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/config/publishingcredentials/list?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'POST'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '52492cda-4f30-11ef-bf98-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp deploy'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552/config/publishingcredentials/list?api-version=2023-01-01 HTTP/1.1" 200 662
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '662'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '501b9e38-2462-47e6-8c8e-1bb77307fd84'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-resource-requests': '11997'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'fbe304ba-6a80-43a5-8597-c42c57820db7'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENCENTRAL:20240731T113046Z:fbe304ba-6a80-43a5-8597-c42c57820db7'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: D81D6D22A6E24593B3D32B0662F6B3D2 Ref B: FRA231050416029 Ref C: 2024-07-31T11:30:45Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:30:45 GMT'
DNFO: cli.azure.cli.command_modules.appservice.custom: Deployment API: https://mytestservice552.scm.azurewebsites.net/api/publish?type=zip&async=True&restart=True&clean=True
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): mytestservice552.scm.azurewebsites.net:443
DEBUG: urllib3.connectionpool: https://mytestservice552.scm.azurewebsites.net:443 "POST /api/publish?type=zip&async=True&restart=True&clean=True HTTP/1.1" 504 20
DEBUG: cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/567d82a1-7f61-4da2-b955-d3244ea6e976
DEBUG: msal.application: Broker enabled? True
DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
DEBUG: msal.application: Cache hit an AT
DEBUG: msal.telemetry: Generate or reuse correlation_id: 7ae598cc-8ac8-458d-974d-7bab34d5afa2
DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01'
DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET'
DEBUG: cli.azure.cli.core.sdk.policies: Request headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '52492cda-4f30-11ef-bf98-3ce1a1b96653'
DEBUG: cli.azure.cli.core.sdk.policies:     'CommandName': 'webapp deploy'
DEBUG: cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --name --type --clean --restart --src-path --async --track-status --debug --output'
DEBUG: cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.62.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.19045-SP0)'
DEBUG: cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
DEBUG: cli.azure.cli.core.sdk.policies: Request body:
DEBUG: cli.azure.cli.core.sdk.policies: This request has no body
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/resourceGroups/rgtest7/providers/Microsoft.Web/sites/mytestservice552?api-version=2023-01-01 HTTP/1.1" 200 7182
DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200
DEBUG: cli.azure.cli.core.sdk.policies: Response headers:
DEBUG: cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Length': '7182'
DEBUG: cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
DEBUG: cli.azure.cli.core.sdk.policies:     'Expires': '-1'
DEBUG: cli.azure.cli.core.sdk.policies:     'ETag': '"1DAE33D06B5B715"'
DEBUG: cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'f3a3e58c-16b8-437a-9922-40faedbc130d'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '249'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-global-reads': '3749'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'c1f0dc82-2b71-443d-a9ee-8481349ae5e5'
DEBUG: cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SWEDENSOUTH:20240731T113447Z:c1f0dc82-2b71-443d-a9ee-8481349ae5e5'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
DEBUG: cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: B173DA97F8F94FECBCEB59E3FF803CE9 Ref B: HEL01EDGE1309 Ref C: 2024-07-31T11:34:47Z'
DEBUG: cli.azure.cli.core.sdk.policies:     'Date': 'Wed, 31 Jul 2024 11:34:46 GMT'
DEBUG: cli.azure.cli.core.sdk.policies: Response content:
DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 664, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 731, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 701, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 334, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 6799, in perform_onedeploy_webapp
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 7026, in _perform_onedeploy_internal
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/appservice/custom.py", line 7012, in _make_onedeploy_request
knack.util.CLIError: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice552.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment

ERROR: cli.azure.cli.core.azclierror: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice552.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment
ERROR: az_command_data_logger: An error occurred during deployment. Status Code: 504, Details: 504.0 GatewayTimeout, Please visit https://mytestservice552.scm.azurewebsites.net/api/deployments/latest to get more information about your deployment
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001A2730DC400>]
INFO: az_command_data_logger: exit code: 1
INFO: cli.__main__: Command ran in 245.365 seconds (init: 0.405, invoke: 244.959)

Linux App Service hostname: https://mytestservice552.azurewebsites.net

Expected behavior

I would expect the deployment to always work.

I would be able to be successfull as a developer, deploying to Azure... I should not need to spend a day trying to troubleshoot this problem....

Environment Summary

azure-cli 2.62.0

core 2.62.0 telemetry 1.1.0

Extensions: containerapp 0.3.53 interactive 0.5.3

Dependencies: msal 1.28.1 azure-mgmt-resource 23.1.1

Additional context

I will try to use New-AzWebApp instead, but I would expect the above to work.. ...

yonzhan commented 4 months ago

Thank you for opening this issue, we will look into it.

microsoft-github-policy-service[bot] commented 4 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.

btardif commented 3 months ago

@tulikac can you take a look?

UtkuBulkan commented 1 month ago

@JoeMarkov, as a Azure customer, we need to debug these for weeks, in order to just to run a simple app. That is how it is.