question

PrabinPaudel-3934 avatar image
0 Votes"
PrabinPaudel-3934 asked PrabinPaudel-3934 commented

Update Web Apps Functions Host Function Keys failed with ARM deployment

We have Azure DevOps release pipeline that provision multiple Azure Functions, however this morning the deployment of one of the app failed due to following :

 Operation name : Update Web Apps Functions Host Function Keys
 Time stamp : Wed Sep 29 2021 06:05:06 GMT-0700 (Pacific Daylight Time)
 Event initiated by : <removed>
 Error code : BadRequest
 Message : Encountered an error (InternalServerError) from host runtime.

Here is a snipped of the JSON request/response copied from Azure portal :

 {
     "authorization": {
         "action": "Microsoft.Web/sites/host/functionKeys/write",
         "scope": ""
     },
     "caller": "",
     "channels": "Operation",
     "claims": {
         "aud": "https://management.azure.com/",
         "iss": "",
         "iat": "",
         "nbf": "",
         "exp": "",
         "aio": "",
         "appid": "",
         "appidacr": "",
         "http://schemas.microsoft.com/identity/claims/identityprovider": "",
         "http://schemas.microsoft.com/identity/claims/objectidentifier": "",
         "rh": "",
         "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "",
         "http://schemas.microsoft.com/identity/claims/tenantid": "",
         "uti": "",
         "ver": "",
         "xms_tcdt": ""
     },
     "correlationId": "",
     "description": "",
     "eventDataId": "",
     "eventName": {
         "value": "EndRequest",
         "localizedValue": "End request"
     },
     "category": {
         "value": "Administrative",
         "localizedValue": "Administrative"
     },
     "eventTimestamp": "2021-09-29T13:05:06.0034471Z",
     "id": "",
     "level": "Error",
     "operationId": "",
     "operationName": {
         "value": "Microsoft.Web/sites/host/functionKeys/write",
         "localizedValue": "Update Web Apps Functions Host Function Keys"
     },
     "resourceGroupName": "",
     "resourceProviderName": {
         "value": "Microsoft.Web",
         "localizedValue": "Azure Web Sites"
     },
     "resourceType": {
         "value": "Microsoft.Web/sites/host/functionKeys",
         "localizedValue": "Microsoft.Web/sites/host/functionKeys"
     },
     "resourceId": "",
     "status": {
         "value": "Failed",
         "localizedValue": "Failed"
     },
     "subStatus": {
         "value": "",
         "localizedValue": ""
     },
     "submissionTimestamp": "2021-09-29T13:06:28.1586712Z",
     "subscriptionId": "",
     "tenantId": "",
     "properties": {
         "statusCode": "BadRequest",
         "statusMessage": "{\"Code\":\"BadRequest\",\"Message\":\"Encountered an error (InternalServerError) from host runtime.\",\"Target\":null,\"Details\":[{\"Message\":\"Encountered an error (InternalServerError) from host runtime.\"},{\"Code\":\"BadRequest\"},{\"ErrorEntity\":{\"Code\":\"BadRequest\",\"Message\":\"Encountered an error (InternalServerError) from host runtime.\"}}],\"Innererror\":null}",
         "eventCategory": "Administrative",
         "entity": "",
         "message": "Microsoft.Web/sites/host/functionKeys/write",
         "hierarchy": ""
     },
     "relatedEvents": []
 }


azure-functions
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

AnuragSingh-MSFT avatar image
1 Vote"
AnuragSingh-MSFT answered PrabinPaudel-3934 commented

Hi @PrabinPaudel-3934

Welcome to Microsoft Q&A!

Are you consistently facing this issue with the same ARM template? If not, this could be a transient (short lived) error. Based on the information above, one of the suggestions would be to set deployment order using depends on in ARM template, so that the Function App and config are ensured to be created before the Key write operation is performed.
In case you are facing this issue frequently, we will need more details from the trace to examine the underlying issue. Please let me know if you have any questions.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


· 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 @PrabinPaudel-3934, I wanted to check if you had a chance to review my answer above. Please let me know if you have any queries or concerns.

1 Vote 1 ·

This is not a consistent issue and we did not face this after the reported one. Thanks for suggesting to use "depends on" that we are going to make sure we use it in future ARM templates.

0 Votes 0 ·