Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure function app deployment error "Encountered an error (ServiceUnavailable) from host runtime. (CODE: 400)"

My python file is in Azure devops repository. I am trying to deploy it to the azure function app and execute the py file. I already building up an service connection "testing" to connect the resource group. My code is following.

steps:

  • task: AzureFunctionApp@1 displayName: 'Azure Function App Deploy: api' inputs: azureSubscription: testing appType: functionAppLinux appName: api package: '$(System.DefaultWorkingDirectory)' runtimeStack: 'DOCKER|microsoft/azure-functions-dotnet-core3.0:3.0' startUpCommand: 'func azure functionapp publish $(functionAppName) --no-bundler'

However, i encounter error ##[error]Error: Failed to sync triggers for function app 'api'. Error: BadRequest - Encountered an error (ServiceUnavailable) from host runtime. (CODE: 400)

like image 580
marcus Avatar asked Dec 18 '25 09:12

marcus


2 Answers

This might help: https://github.com/Azure/azure-functions-host/issues/5722

I had the same issue and removing WEBSITE_RUN_FROM_PACKAGE from siteConfig.appSettings fixed the issue.

like image 194
Balint Bako Avatar answered Dec 21 '25 07:12

Balint Bako


As a follow-up to Balint's answer, I had something similar happen which started causing this same problem. In my case I'm using keyvault secrets in my configuration to load some keys, and this failed until I refreshed my config.

like image 23
VladDrak Avatar answered Dec 21 '25 07:12

VladDrak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!