azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

webapp:WARNING message during zip deploy

Open williamthiago opened this issue 8 years ago • 12 comments

Describe the bug Random error occurring during zip deployment, showing the message WARNING looping over more than 15 minutes until we detect and manually stop the process (CTRL + C)

Unfortunately, there's no message other than "WARNING:" in logs.

az webapp deployment source config-zip --name ${AZURE_APP_WEB} --resource-group ${AZURE_RG} --src ${FILE_ZIP}
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 

To Reproduce Try to deploy zip file.

az webapp deployment source config-zip --name ${AZURE_APP_WEB} --resource-group ${AZURE_RG} --src ${FILE_ZIP}

Expected behavior Run with success or show the message of error/warning to be addressed.

Environment summary Bitbucket pipelines using microsoft/azure-cli image.

williamthiago avatar Jun 12 '18 12:06 williamthiago

@yugangw-msft

troydai avatar Jun 12 '18 15:06 troydai

//CC: @panchagnula

yugangw-msft avatar Jun 12 '18 15:06 yugangw-msft

@williamthiago unfortunately, the message displayed by CLI is coming from the deployment itself. Looks like zip deployment is failing for some unknown reason. Can you check your scm site https://.scm.azurewebsites.net & navigate to LogFiles> Kudu>Deployment & share if you get more details from the logs here? Thanks!

panchagnula avatar Jun 12 '18 22:06 panchagnula

Checked. There's no log during this time. I checked "D:\home\LogFiles\kudu\trace" as well and found a partial XML.

The file has no closing tags, it just ends as below:

<step title="BackgroundTrace" date="2018-06-13T00:36:48.081" instance="607acc" url="/api/zipdeploy" method="POST" >
    <step title="Creating temporary deployment" date="2018-06-13T00:36:48.612" />
    <!-- duration: 297ms -->
    <step title="Performing fetch based deployment" date="2018-06-13T00:36:48.940" >
        <step title="Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\kreqq4le.zip (2.72 MB) to D:\local\Temp\zipdeploy\extracted" date="2018-06-13T00:36:49.128" />
        <!-- duration: 844ms -->
        <step title="DeploymentManager.Deploy(id:748d920dfa064d559e7587f1a3f7ebf4)" date="2018-06-13T00:36:49.972" >
            <step title="Collecting changeset information" date="2018-06-13T00:36:50.003" />
            <!-- duration: 782ms -->
            <step title="Updating submodules" date="2018-06-13T00:36:50.785" />
            <!-- duration: 47ms -->
            <step title="Determining deployment builder" date="2018-06-13T00:36:51.019" >
                <step title="Builder is BasicBuilder" date="2018-06-13T00:36:51.019" />
                <!-- duration: 0ms -->
            </step>
            <!-- duration: 16ms -->
            <step title="Copying SSH keys" date="2018-06-13T00:36:51.066" />
            <!-- duration: 16ms -->
            <step title="Building" date="2018-06-13T00:36:51.082" >
                <step title="Generating deployment script" date="2018-06-13T00:36:51.129" >
                    <step title="Using cached version of the deployment script for command: -y --no-dot-deployment -r &quot;D:\local\Temp\zipdeploy\extracted&quot; -o &quot;D:\home\site\deployments\tools&quot; --basic --sitePath &quot;D:\local\Temp\zipdeploy\extracted&quot;" date="2018-06-13T00:36:51.191" />
                    <!-- duration: 16ms -->
                </step>
                <!-- duration: 78ms -->
                <step title="Executing external process" date="2018-06-13T00:36:52.622" type="process" path="starter.cmd" arguments="&quot;D:\home\site\deployments\tools\deploy.cmd&quot;" />
                <!-- duration: 1906ms -->
                <step title="Error occurred" date="2018-06-13T00:36:54.559" type="error" text="Thread was being aborted." stackTrace="   at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Kudu.Core.Deployment.FetchDeploymentManager.&lt;&gt;c__DisplayClass11_1.&lt;PerformBackgroundDeployment&gt;b__3() in C:\Kudu Files\Private\src\master\Kudu.Core\Deployment\FetchDeploymentManager.cs:line 343
   at Kudu.Contracts.Infrastructure.LockExtensions.TryLockOperation(IOperationLock lockObj, Action operation, String operationName, TimeSpan timeout) in C:\Kudu Files\Private\src\master\Kudu.Contracts\Infrastructure\LockExtensions.cs:line 35
   at Kudu.Contracts.Infrastructure.LockExtensions.LockOperation(IOperationLock lockObj, Action operation, String operationName, TimeSpan timeout) in C:\Kudu Files\Private\src\master\Kudu.Contracts\Infrastructure\LockExtensions.cs:line 46
   at Kudu.Core.Deployment.FetchDeploymentManager.&lt;&gt;c__DisplayClass11_0.&lt;PerformBackgroundDeployment&gt;b__1() in C:\Kudu Files\Private\src\master\Kudu.Core\Deployment\FetchDeploymentManager.cs:line 323" />
                <!-- duration: 16ms -->
>
                <step title="Error occurred" date="2018-06-13T00:36:54.575" type="error" text="Thread was being aborted." stackTrace="   at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at Kudu.Core.Infrastructure.Executable.ExecuteInternal(ITracer tracer, Func`2 onWriteOutput, Func`2 onWriteError, Encoding encoding, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 221
   at Kudu.Core.Infrastructure.Executable.ExecuteWithProgressWriter(ILogger logger, ITracer tracer, String arguments, Object[] args) in C:\Kudu Files\Private\src\master\Kudu.Core\Infrastructure\Executable.cs:line 144
   at Kudu.Core.Deployment.Generator.ExternalCommandBuilder.RunCommand(DeploymentContext context, String command, Boolean ignoreManifest, String message) in C:\Kudu Files\Private\src\master\Kudu.Core\Deployment\Generator\ExternalCommandBuilder.cs:line 78" />
                <!-- duration: 0ms -->
                <step title="Purge deployment items" date="2018-06-13T00:36:55.637" >
                    <step title="Remove temp-e895, Failed, received at 6/13/2018 12:36:48 AM" date="2018-06-13T00:36:55.715" />
                    <!-- duration: 0ms -->
                </step>
                <!-- duration: 94ms -->
                <step title="Purge deployment items" date="2018-06-13T00:36:55.747" 

It's obviously an Azure/Kudu issue... I appreciate your time, tks.

williamthiago avatar Jun 13 '18 04:06 williamthiago

I get a similar warning message: az : WARNING: Generating deployment script. Nothing seems to be wrong, but it's annoying...

diirib avatar Jul 03 '18 10:07 diirib

Hi!

I get the same error. If i run the deployment of a zip archive to Azure Web App one after another, it will freeze, constantly showing WARNING.

I was able to retrieve the log from LogFiles\kudu\trace\

<step title="BackgroundTrace" date="2018-09-11T12:09:11.627" instance="7b89f6" url="/api/zipdeploy" method="POST" >
    <step title="Creating temporary deployment" date="2018-09-11T12:09:11.707" />
    <!-- duration: 60ms -->
    <step title="Performing fetch based deployment" date="2018-09-11T12:09:11.783" >
        <step title="Cleaning up temp folders from previous zip deployments and extracting pushed zip file D:\local\Temp\zipdeploy\ayute31h.zip (4.61 MB) to D:\local\Temp\zipdeploy\extracted" date="2018-09-11T12:09:11.924" >
            <step title="Error occurred" date="2018-09-11T12:09:13.096" type="error" text="Thread was being aborted." stackTrace="   at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
   at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout, Boolean exitContext)
   at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout)
   at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.SpinThenBlockingWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.InternalWait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Kudu.Core.Deployment.FetchDeploymentManager.&lt;&gt;c__DisplayClass11_1.&lt;PerformBackgroundDeployment&gt;b__3() in C:\Kudu Files\Private\src\master\Kudu.Core\Deployment\FetchDeploymentManager.cs:line 339
   at Kudu.Contracts.Infrastructure.LockExtensions.TryLockOperation(IOperationLock lockObj, Action operation, String operationName, TimeSpan timeout) in C:\Kudu Files\Private\src\master\Kudu.Contracts\Infrastructure\LockExtensions.cs:line 34
   at Kudu.Contracts.Infrastructure.LockExtensions.LockOperation(IOperationLock lockObj, Action operation, String operationName, TimeSpan timeout) in C:\Kudu Files\Private\src\master\Kudu.Contracts\Infrastructure\LockExtensions.cs:line 46
   at Kudu.Core.Deployment.FetchDeploymentManager.&lt;&gt;c__DisplayClass11_0.&lt;PerformBackgroundDeployment&gt;b__1() in C:\Kudu Files\Private\src\master\Kudu.Core\Deployment\FetchDeploymentManager.cs:line 323" />
            <!-- duration: 16ms -->
        </step>
        <!-- duration: 1203ms -->

It says text="Thread was being aborted.". Is there a way to avoid it? Do i just set a timeout?

GrimSmiler avatar Sep 11 '18 12:09 GrimSmiler

@suwatch, can you point us to someone who can help us with investigating this. The scenario is zip deployment being executed one after the other. CLI command calls the async zipdeployment command & keeps polling for the status.

panchagnula avatar Sep 11 '18 16:09 panchagnula

@GrimSmiler when you said run zip deploy one after another, did you wait or check if the current one completed? The error indicated there was an ongoing deployment. You can use /api/deployments to check the status of your deployment before launching another.

suwatch avatar Sep 11 '18 18:09 suwatch

@GrimSmiler when you said run zip deploy one after another, did you wait or check if the current one completed? The error indicated there was an ongoing deployment. You can use /api/deployments to check the status of your deployment before launching another.

Hi! i waited for 5 mins - did not help. i also stopped the app, do not know if that helps.

I will check out the status through /api/deployments and will get back to you

How i run the script: az webapp deployment source config-zip -g $resourceGroupName -n $webAppName --src $service.ZipPath is executed in a PS script, and i execute the script again after the previous one has finished.

GrimSmiler avatar Sep 12 '18 14:09 GrimSmiler

@suwatch can you tell me what cli command to use to get deployment status?

GrimSmiler avatar Sep 12 '18 15:09 GrimSmiler

@GrimSmiler , there is no CLI command currently that returns the desployment status - however, the zip deployment keeps polling & returns the status using the deployments API, if this doesn't finish for a specific time, it return a warning, with a link to the scm site to check the status.

panchagnula avatar Sep 12 '18 18:09 panchagnula

@panchagnula , as you can see in the first post, the CLI does not show the scm site where the status can be checked.

Describe the bug Random error occurring during zip deployment, showing the message WARNING looping over more than 15 minutes until we detect and manually stop the process (CTRL + C)

Unfortunately, there's no message other than "WARNING:" in logs.

az webapp deployment source config-zip --name ${AZURE_APP_WEB} --resource-group ${AZURE_RG} --src ${FILE_ZIP}
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 
WARNING: 

To Reproduce Try to deploy zip file.

az webapp deployment source config-zip --name ${AZURE_APP_WEB} --resource-group ${AZURE_RG} --src ${FILE_ZIP}

Expected behavior Run with success or show the message of error/warning to be addressed.

Environment summary Bitbucket pipelines using microsoft/azure-cli image.

So i am a bit lost about how to check the status. Currently I can only check the status through Kudu service through azure portal manually in the logs. Is this what You mean? Do I need to to check the status there?

Please forgive me if I misunderstood you. I do not see a clear solution or a workaround for a current problem. :(

A workaround would be to wait for 5-10 mins, but that would be a very dirty fix and a no go :(

GrimSmiler avatar Sep 13 '18 14:09 GrimSmiler