question

GaryBao-6322 avatar image
0 Votes"
GaryBao-6322 asked GaryBao-6322 commented

Azure Slot Swap Job Processor failed: Cannot swap slots for site because the worker process in slot aborted the warmup request

Suddenly started happening consistently across all Azure App Services using Deployment Slots.

84604-2.png

Error Message: "Failed swapping site. Error: Cannot swap slots for site because the worker process in slot aborted the warmup request. This may happen if site has IP Restriction or URL rewrite rules that block HTTP requests."


Couldn't find any references regarding this issue, not sure if anyone else is experiencing this. Have attempted all suggested solutions in this post https://ruslany.net/2017/11/most-common-deployment-slot-swap-failures-and-how-to-fix-them/ but doesn't resolve my issue.

Nothing was done on Azure Global Configuration scope, and certainly cannot be an issue caused by any single project because this is happening across all projects deployed to Azure App Service using Deployment Slots.


Error Resonse:

 {
     "caller": "SlotSwapJobProcessor",
     "channels": "Operation",
     "claims": {
         "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/spn": "SlotSwapJobProcessor"
     },
     "correlationId": "xxx",
     "description": "Failed swapping site. Error: Cannot swap slots for site 'xxx' because the worker process in 'staging' slot aborted the warmup request.  This may happen if site has IP Restriction or URL rewrite rules that block HTTP requests.",
     "eventDataId": "xxx",
     "eventName": {
         "value": "SwapWebSiteTrace",
         "localizedValue": "SwapWebSiteTrace"
     },
     "category": {
         "value": "Administrative",
         "localizedValue": "Administrative"
     },
     "eventTimestamp": "2021-04-01T19:44:55.0130397Z",
     "id": "/subscriptions/xxx/resourcegroups/xxx/providers/microsoft.web/sites/xxx/slots/staging/events/xxx/ticks/xxx",
     "level": "Error",
     "operationId": "xxx",
     "operationName": {
         "value": "Microsoft.Web/sites/slots/SlotSwap/action",
         "localizedValue": "Microsoft.Web/sites/slots/SlotSwap/action"
     },
     "resourceGroupName": "defaul",
     "resourceProviderName": {
         "value": "Microsoft.Web",
         "localizedValue": "Azure Web Sites"
     },
     "resourceType": {
         "value": "microsoft.web/sites/slots",
         "localizedValue": "microsoft.web/sites/slots"
     },
     "resourceId": "/subscriptions/xxx/resourcegroups/xxx/providers/microsoft.web/sites/xxx/slots/staging",
     "status": {
         "value": "Failed",
         "localizedValue": "Failed"
     },
     "subStatus": {
         "value": "",
         "localizedValue": ""
     },
     "submissionTimestamp": "2021-04-01T19:45:04.7469589Z",
     "subscriptionId": "xxx",
     "tenantId": "",
     "properties": {
         "Message": "Failed swapping site. Error: Cannot swap slots for site 'xxx' because the worker process in 'staging' slot aborted the warmup request.  This may happen if site has IP Restriction or URL rewrite rules that block HTTP requests."
     },
     "relatedEvents": []
 }


azure-webapps
2.png (30.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SnehaAgrawal-MSFT avatar image
0 Votes"
SnehaAgrawal-MSFT answered GaryBao-6322 commented

Thanks for asking question! Could you please try swapping the slots using the PowerShell cmdlets.

You can refer to the official documentation for this: https://docs.microsoft.com/en-us/azure/app-service/deploy-staging-slots#swap-deployment-slots

Also, just to confirm if you have applied a Content Security Policy to Azure Web App? If so you can check the web.config using the App Service Editor (that is available through the Azure Portal). This issue is due to how the Azure Portal encodes the carriage returns in your code. If this is the case you need to add the code one a single line which reduces the readability but is required for Azure to swap and this should help solve the issue.

Check SO link might be helpful.

Let us know if issue remains.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi, thanks for the response!

Just wondering that why should I try swapping slots using the PowerShell? Maybe my question wasn't clear, these swaps were not done manually.

Our configuration is:
GitHub => Azure App Service Deployment Center => Azure Deployment Slot Staging => Successfully deployed automatically => Auto Swap => Swapped to Production Slot => Done

The error comes in during the "Auto Swap" phase.

Thank you for your help!

0 Votes 0 ·

And I have just checked my web.config file using App Service Editor, and no there is no Content-Security-Policy value.

Thanks

0 Votes 0 ·