简体   繁体   中英

dotnet-isolated azure function container loads 0 of 1 function from metadata and then gives http status 204 (content not found)

I have .net 6 isolated function docker container that works locally but not in azure. The docker file copies the build output binaries to the home/site/wwwroot directory of the container based on the image mcr.microsoft.com/azure-functions/do.net-isolated:4-do.net-isolated6.0.

When I look at the live log stream I can see在此处输入图像描述

the configuration is setup correctly as far as I can see but I don't have full access. its setup as do.net-isolated and functions version 4. I can see its pointing at the right docker image.

I'm not sure what else to check troubleshoot why it doesn't start properly. Are the files in the correct location in the docker file? does it need anything else that I have missed?

Any advice will be greatly appreciated.

Thanks

Thanks, i should have mentioned that this is for a timer trigger only so there is no http triggers

In the Azure Functions:

  • For the Http Triggers, response comes in Http Status Codes.
  • For Timer Triggers, failed responses can be thrown in the form of exceptions but not the status codes.

I found an article in dontcodetired site where the author mentioned that we can write the status code manually which returns automatically during some situations which is taken care of by Azure Functions Runtime.

One of those situations is returning the status codes automatically in the case of failed operation like without the exception, function completes the execution without proper result which is a kind of internal server problem- it means the request of (any trigger type) is processed/succeeded but without proper response or operation result.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM