2

I have an Azure Function App running .Net Framework (target framework 4.6.1) but is now failing. Per documentation, the Function was set up as .Net Core and then downgraded to v1 to support Framework. The Function worked after I initially published it from Visual Studio, but soon stopped working.

I get a 500 error when I try to hit the function from my mobile app. When I go to a function within the app in Azure Portal, the following error appears:

The function runtime is unable to start.

I have restarted the Function App, as well as actually stopping and then starting again. I tried to re-publish the code from Visual Studio, but that fails, saying:

The attempt to publish the ZIP file through https://***.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code InternalServerError.

Application Insights had been working on it previously, but it isn't showing any network requests anymore.

Is there anywhere to go to get better diagnostics? Every error I've seen has been vague. Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?

rgahan
  • 667
  • 8
  • 17
  • Do you have a reference to `Microsoft.Azure.WebJobs.ServiceBus v2.3` in your project? Apparently there is some sketchy support for that package: [https://stackoverflow.com/a/54155944/4067411](https://stackoverflow.com/a/54155944/4067411) – Uber Schnoz Mar 06 '20 at 23:19
  • @UberSchnoz no, I only have sendgrid, aspnet.webapi.client, and .net.sdk.functions. Unless service buss happens to be a dependency for .net.sdk.functions – rgahan Mar 07 '20 at 00:05

2 Answers2

2

The function runtime is unable to start.

You'd better watch log stream / use app insights to capture what is the problem. (you can also check the logs using Kudu)

I'm not 100% sure, but I believe there's a high chance you're not with runtime v1:

enter image description here

Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?

Besides you're locked with some specific dependency versions, there are more important details to pay attention: https://github.com/Azure/app-service-announcements/issues/129

I've been in this "hell" of making v1 to work with more recent dependency versions. It's super complex and not very stable. If you really need to stick v1, I strongly recommend you to migrate your code to Azure Container Instances and use Azure Function v1 just as a triggering mechanism.

If possible, you should migrate to core and use the latest runtime version.

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Unfortunately, app insights isn't listening to it anymore for some reason. I used to be able to monitor the requests, but not anymore. Kudo also wasn't working as expected. I am on v1, that's what the linked docs instructed me to do. Good to know about going to azure container, been wondering if it's just an issue with how they support framework. Unfortunately, we have to stick with framework because of the computation that is being done – rgahan Mar 07 '20 at 00:02
  • if you need to stick with that, I would say to move to another service (ACI as I said), this way you can keep the dependencies yourself. – Thiago Custodio Mar 07 '20 at 00:06
  • Cool, I'll wait to see if any other answers come in over the weekend, otherwise I'll try that at work on Monday – rgahan Mar 07 '20 at 00:11
0

Depolyments started failing for me with the cryptic "InternalServerError" after I updated the storage account access key used by the function app service. You need to update the following configuration settings on your app service:

  • AzureWebJobsDashboard
  • WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
  • AzureWebJobsStorage