Azure / Azure-Functions

1.11k stars 197 forks source link

function app storage queue trigger is not working with vnet integration #1377

Open svangeti opened 4 years ago

svangeti commented 4 years ago

I have a function app in linux app service plan (Standard) with VNet integration with Storage Queue trigger configured on it. Everything works fine if there are no firewall rules enabled on storage account and I see this error as soon as the firewall rules are enabled on storage account. The function app is configured with WEBSITE_RUN_FROM_PACKAGE with URL where package is uploaded in the container.

I am using the same subnet for storage account firewall rules and function app VNet integration. I am able to verify the package URL works fine. What am I doing wrong here?


`ERROR - RunFromPackage> Failed to download package from https://mystorage.blob.core.windows.net/mycontainer/my-function.zip?sv=2017-07-29&ss=b&srt=o&sp=rwlu&se=2019-11-28T20:15:18Z&st=2019-10-29T20:15:18Z&spr=https&sig=YiKShpniKMUqUqNTsA3M2qsAr3KAb%2Bpk%2`
mivano commented 4 years ago

We see similar issues. Ever found a solution for this?

mivano commented 4 years ago

From the logs:

2020-05-28T11:05:33.012Z ERROR - RunFromPackage> Failed to download package from https://xxxxxxxx.blob.core.windows.net/function-releases/20200528082442-8b6822d6-7e65-45db-8505-114df5ef881d.zip?se=2040-05-28T08%3A24Z&sp=r&spr=https&sv=2018-11-09&sr=b&sig=zdJTUakjSYQ%3D
2020-05-28T11:05:33.018Z INFO  - Stopping site xxxxxxxx because it failed during startup.

When we placed the files on a storage account outside the same VNET:

2020-05-28T11:10:15.500Z INFO  - Starting container for site
2020-05-28T11:10:15.502Z INFO  - docker run -d -p 80:80 --name xxxxx-e WEBSITE_CORS_ALLOWED_ORIGINS=https://functions.azure.com,https://functions-staging.azure.com,https://functions-next.azure.com -e WEBSITE_CORS_SUPPORT_CREDENTIALS=False -e WEBSITE_SITE_NAME=xxxxxx -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=xxxxxx.azurewebsites.net -e WEBSITE_INSTANCE_ID=2b799b2f6ac098f998e54fa39663b5272b838e6a8121155e09543cdef8fc15df mcr.microsoft.com/azure-functions/dotnet:3.0-appservice-stage4  

2020-05-28T11:10:15.502Z INFO  - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2020-05-28T11:10:17.165Z INFO  - Starting container for site
2020-05-28T11:10:17.167Z INFO  - docker run -d -p 8081:8081 --name xxxxxx_0_1db49ab1_middleware -e WEBSITE_CORS_ALLOWED_ORIGINS=https://functions.azure.com,https://functions-staging.azure.com,https://functions-next.azure.com -e WEBSITE_CORS_SUPPORT_CREDENTIALS=False -e WEBSITE_SITE_NAME=xxxxxx -e WEBSITE_AUTH_ENABLED=False -e PORT=8081 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=xxxxxxx.azurewebsites.net -e WEBSITE_INSTANCE_ID=2b799b2f6ac098f998e54fa39663b5272b838e6a8121155e09543cdef8fc15df appsvc/middleware:2001061754 /Host.ListenUrl=http://0.0.0.0:8081 /Host.DestinationHostUrl=http://169.254.130.3:80 /Host.UseFileLogging=true