Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerized .NET 5 (dotnet-isolated) function does not run when triggered #568

Closed
nachiappannk opened this issue Aug 6, 2021 · 1 comment · Fixed by #583
Closed

Dockerized .NET 5 (dotnet-isolated) function does not run when triggered #568

nachiappannk opened this issue Aug 6, 2021 · 1 comment · Fixed by #583
Assignees

Comments

@nachiappannk
Copy link

  • .NET 5 (dotnet-isolated) function with Http Trigger (and Service Bus also) when dockerized and deployed Azure, the function is not run when triggered.
  • The issue is observed when using Microsoft.Azure.Functions.Worker version 1.4.0
  • The issue is resolved when downgrading the package Microsoft.Azure.Functions.Worker version 1.0.0

Steps to reproduce the issue

Prerequisites

Run the below commands from root of repo after logging in to azure (az login) and docker (docker login)

  • docker build -t nachiappan/function-issue-demo:bug .
  • docker push nachiappan/function-issue-demo:bug
  • az group create --name NachiFuncDemo --location westeurope
  • az storage account create --name nachistoragedemoforfunc --location westeurope --resource-group NachiFuncDemo --sku Standard_LRS
  • az functionapp plan create -g NachiFuncDemo -n FunctionAppPlan --sku EP1 --is-linux true
  • az functionapp create --name nachifunctionissuedemo --storage-account nachistoragedemoforfunc --resource-group NachiFuncDemo -p FunctionAppPlan --functions-version 3 --runtime dotnet-isolated --deployment-container-image-name docker.io/nachiappan/function-issue-demo:bug

Reach the URL

  • Hit the url in a browser https://nachifunctionissuedemo.azurewebsites.net/api/HttpTriggeredFunction?

Expected

  • The page loads with message "Welcome to Azure Functions!"

Actual

  • The page does not load

Work around

  • In the file func-tool-bug.csproj downgrade the version of Microsoft.Azure.Functions.Worker to 1.0.0
  • docker build with docker build -t nachiappan/function-issue-demo:nobug .
  • docker push with docker push nachiappan/function-issue-demo:nobug
  • update the docker image with az functionapp create --name nachifunctionissuedemo --storage-account nachistoragedemoforfunc --resource-group NachiFuncDemo -p FunctionAppPlan --functions-version 3 --runtime dotnet-isolated --deployment-container-image-name docker.io/nachiappan/function-issue-demo:nobug

Other Observation

  • Functions build with 1.4.0 of Microsoft.Azure.Functions.Worker
    • works with locally running docker
    • works deploying to azure with out docker
    • works locally running as a console application
    • DOES NOT WORK when dockerized and deployed to azure function
  • Kudu logs indicate there is a problem with HTTP protocol when trying to make a GRPC call

log

@brettsam
Copy link
Member

I believe you're hitting the same issue as #524. Can you try the workaround there and see if that fixes it?

@ghost ghost locked as resolved and limited conversation to collaborators Sep 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants