azure-webjobs-sdk-extensions
azure-webjobs-sdk-extensions copied to clipboard
Can't run a EventGridTrigger function inside docker because of an 401 during registration
Running a dotnet core 2 function with eventGrid trigger inside a docker container (microsoft/azure-functions-dotnet-core2.0:latest) is not able to register to an event grid topic because of an Unauthorized (401) error. Running the same function in azure function cli on windows or linux does work.
Repro steps
- Create new azure function with EventGrid binding and docker support
- Run on azure cli
- Call http://localhost:7071/runtime/webhooks/EventGridExtensionConfig -> works: 404 with cannot find function: ''
- build and run docker (e.g. on port 8100)
- Call http://localhost:8100/runtime/webhooks/EventGridExtensionConfig ->does not work: 401
Expected behavior
Running the azure function host with eventGrid extension in docker should also disable the authentication as when running in azure cli
Actual behavior
The extension cannot be run in docker because the registration fails with an 401 error.
Known workarounds
none
Related information
Provide any related information
- Microsoft.NET.Sdk.Functions 1.0.14
- Microsoft.Azure.WebJobs.Extensions.EventGrid 2.0.0-beta2
Any updates on this? I really need this feature.
Having the same issue, but on Azure instead of locally. Attempting to run a function app in a Linux App Service Plan (using "Code" mode, thus managed container) and getting HTTP 401 despite providing a host key in the code query string parameter.
I am having exactly the same issue in docker. How do we work around this?
Can we get some feed back on this please? its been active for 4 months and not a single response, how is this helping the community?
Have you updated the dockerfile to the latest function core runtime? They keep changing the names quite often, so I ended up using an old runtime for some time. I don't have this issue anymore, but can't really pin it down to either a runtime change or a config change on my part. One other workaround is of course to use a http trigger that can also be used for a eventgrid subscription.
Thanks for feeding back. I'm using the following images to build and run the container: installer base: FROM microsoft/dotnet:2.2-sdk AS installer-env image base: FROM mcr.microsoft.com/azure-functions/dotnet:2.0
Yeah I know about the HTTP function but its a bit of a pain having to change them all to HTTP.
Just double checked my code and you are right, the error is still exisiting in the current docker image. Also checked my event grid subscriptions and for docker targets they are all using the http trigger. So no update on that one from my side, sorry.
Ah that makes sense. Thanks for your input though.
If only someone from the Azure team would engage then we would at least know if they plan to do anything about it, otherwise I will have to move to the HTTP triggers. :(
its very disappointing that we haven't had any feed back on this issue. Whats the point in allowing us to raise issues if you are not going to feedback!!
Has there been any movement on this yet?
This is indeed an issue. Any news from the Azure team ?
It's working when function is started in docker using Visual studio, but during creation of container using compose file it's not.
Same issue here.
Any update on this?
any update on this?