bicep icon indicating copy to clipboard operation
bicep copied to clipboard

InternalServerError - Long running operation failed with status 'Failed'. Additional Info:'Encountered internal server error while processing the deployment what-if request

Open dani3lheidemann opened this issue 2 years ago • 2 comments

Bicep version Bicep CLI version 0.7.4

Describe the bug Hi, I have a problem with multiple module calls with context switch (Subscription, RG) within a main.bicep. In the main bicep I try to create a spoke and depending on the input params to either peer to the vWAN hub or unmanaged hub (VNET). In addition, each spoke should be peered to an Azure Bastion VNET.

My issue always occurs with the SECOND module call with context switch (Subscription, RG). If I comment out all modules with context switch except one (no matter which one) the deployment works.

Debug Output of my command:


New-AzDeployment `
            -Location $param.p_location `
            -Name $deploymentName `
            -TemplateFile $templateFilePath `
            -TemplateParameterObject $templateParams `
            -Confirm `
            -Verbose `
            -Debug

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

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : 5470c854-c0b3-478b-9cc9-46788880759c
x-ms-correlation-request-id   : 5470c854-c0b3-478b-9cc9-46788880759c
x-ms-routing-request-id       : GERMANYWESTCENTRAL:20220620T101925Z:5470c854-c0b3-478b-9cc9-46788880759c
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Mon, 20 Jun 2022 10:19:24 GMT

Body:
{
  "status": "Failed",
  "error": {
    "code": "InternalServerError",
    "message": "Encountered internal server error while processing the deployment what-if request. Diagnostic information: timestamp '20220620T101911Z', scope '/subscriptions/c3b14395-a806-4041-a8c0-fe0149f6ea20', tracking id 'e87e37bb-b43a-429a-b5fb-80a9d939df1e', request correlation id
'02f6c865-3fcc-4da5-82dd-5a33b19a5952'."
  }
}

To Reproduce

As soon as I comment out point 1 or 2 from my main.bicep, so that only one module with context switch is called, it works. Both modules at the same time throw the error.

image

I have no clue what's wrong here, but for me it looks like a bug. Thank you all in advance for your help!

Best Daniel

dani3lheidemann avatar Jun 20 '22 10:06 dani3lheidemann

Can you provide a correlation ID for this issue to help us investigate?

alex-frankel avatar Jun 22 '22 19:06 alex-frankel

Hi @alex-frankel,

thanks for your answer! Sure, here are two correlation IDs of failed deployments:

  • 232e2e3a-1455-4e20-b84c-520630a0503b
  • 02f6c865-3fcc-4da5-82dd-5a33b19a5952

Thank you!

dani3lheidemann avatar Jun 23 '22 05:06 dani3lheidemann

The fix was deployed.

shenglol avatar Oct 11 '22 17:10 shenglol