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

Gary.Bao 1 Reputation point
2021-04-05T21:04:25.407+00:00

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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,305 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,261 Reputation points
    2021-04-06T09:52:44.117+00:00

    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://learn.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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.