Access to the path 'C\home\LogFiles\Application\Functions\Host' is denied

BeniaminMuresan-5169 116 Reputation points
2021-09-24T08:57:12.643+00:00

Hello,

We have several azure functions in a dedicated plan and part of a vnet that use the same storage account. The storage account has the sole scope to meet the requirement that a function must always be linked to a storage.

We want to secure the storage and allow only traffic from the vnet. The functions are part of this vnet so there should be no issue.
However, when using an P1V2:2 dedicated app service plan for the functions, we face an error stating:

134992-image.png

It seems that we are not the only ones:
https://github.com/Azure/Azure-Functions/issues/1349

From what I understand, setting the following appsettings should make the error disappear:

WEBSITE_CONTENTOVERVNET = 1.
WEBSITE_VNET_ROUTE_ALL = 1.
WEBSITE_DNS_SERVER =168.63.129.16.

I have a hard time constantly reproducing the problem, but understanding the solution even in this situation, it would be great:

  1. We are not using private endpoints. We just integrate with the vnet so the service endpoints are in use. Are all those appsettings still relevant even if not using private endpoints? I would avoid doing unrelated configurations.
  2. WEBSITE_CONTENTOVERVNET = 1 seems to be the most important setting. The docs state: A value of 1 enables your function app to scale when you have your storage account restricted to a virtual network. You should enable this setting when restricting your storage account to a virtual network. (https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentovervnet)
    What scaling means in this context?
    1. This seems to happen randomly, does anyone have any suggestion how to reproduce this constantly? It would be much easier to understand if the fixes work.
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,932 questions
0 comments No comments
{count} votes

Accepted answer
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2021-10-05T08:05:37.647+00:00

    @BeniaminMuresan-5169 ,

    Please find the answers to your queries below,

    1. We are not using private endpoints. We just integrate with the vnet so the service endpoints are in use. Are all those appsettings still relevant even if not using private endpoints? I would avoid doing unrelated configurations. Ans: Yes. The below settings are still applicable as you have enabled service endpoints for Storage account. Please refer this article for more details : https://learn.microsoft.com/en-us/azure/azure-functions/configure-networking-how-to#restrict-your-storage-account-to-a-virtual-network WEBSITE_CONTENTOVERVNET = 1.
      WEBSITE_VNET_ROUTE_ALL = 1.
      WEBSITE_DNS_SERVER =168.63.129.16 (applicable when you are using Azure DNS)
    2. WEBSITE_CONTENTOVERVNET = 1 seems to be the most important setting. The docs state: A value of 1 enables your function app to scale when you have your storage account restricted to a virtual network. You should enable this setting when restricting your storage account to a virtual network. (https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#website_contentovervnet)
      What scaling means in this context? Ans: Scaling in this context refers to the scaling out of the Function worker instances. You are running on a P1V2:2 dedicated app service plan, so if you have
      configured Autoscale rules, scale out happens based on the rules you have specified. When this setting is enabled, scaling operation isn’t affected when the storage is
      restricted to virtual network
    3. This seems to happen randomly, does anyone have any suggestion how to reproduce this constantly? It would be much easier to understand if the fixes work. Ans: It is unfortunate that this issue is happening randomly. Possibly a transient one. Improper configuration would lead to reproducing this issue constantly.

    I hope this helps.

    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 people found this answer helpful.

0 additional answers

Sort by: Most helpful

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.