简体   繁体   English

.Net Framework 4.6.1 中的 Azure Function App 突然停止工作

[英]Azure Function App in .Net Framework 4.6.1 suddenly stops working

I have an Azure Function App running .Net Framework (target framework 4.6.1) but is now failing.我有一个运行 .Net Framework(目标框架 4.6.1)的 Azure Function App,但现在失败了。 Per documentation , the Function was set up as .Net Core and then downgraded to v1 to support Framework.根据文档,Function 被设置为 .Net Core,然后降级到 v1 以支持 Framework。 The Function worked after I initially published it from Visual Studio, but soon stopped working.该函数在我最初从 Visual Studio 发布后工作,但很快停止工作。

I get a 500 error when I try to hit the function from my mobile app.当我尝试从我的移动应用程序中点击该功能时,出现 500 错误。 When I go to a function within the app in Azure Portal, the following error appears:当我在 Azure 门户中转到应用程序中的某个函数时,出现以下错误:

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:我试图从 Visual Studio 重新发布代码,但失败了,说:

The attempt to publish the ZIP file through https://***.scm.azurewebsites.net/api/zipdeploy failed with HTTP status code InternalServerError.尝试通过https://***.scm.azurewebsites.net/api/zipdeploy发布 ZIP 文件失败,HTTP 状态代码为 InternalServerError。

Application Insights had been working on it previously, but it isn't showing any network requests anymore. Application Insights 之前一直在处理它,但它不再显示任何网络请求。

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?此外,在 .Net Framework 4.6.1 上运行 Azure Function 应用程序是否存在我需要注意的已知问题?

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 ) (您也可以使用Kudu检查日志)

I'm not 100% sure, but I believe there's a high chance you're not with runtime v1:我不是 100% 确定,但我相信您很可能没有使用 runtime v1:

在此处输入图片说明

Additionally, are there known issues with running Azure Function apps on .Net Framework 4.6.1 that I need to be aware of?此外,在 .Net Framework 4.6.1 上运行 Azure Function 应用程序是否存在我需要注意的已知问题?

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除了您被某些特定的依赖版本锁定之外,还有更重要的细节需要注意: 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.我一直在使 v1 与更新的依赖版本一起工作的“地狱”。 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.如果你真的需要坚持 v1,我强烈建议你将代码迁移到 Azure 容器实例,并使用 Azure Function v1 作为触发机制。

If possible, you should migrate to core and use the latest runtime version.如果可能,您应该迁移到核心并使用最新的运行时版本。

Depolyments started failing for me with the cryptic "InternalServerError" after I updated the storage account access key used by the function app service.在我更新函数应用服务使用的存储帐户访问密钥后,Depolyments 开始因神秘的“InternalServerError”而失败。 You need to update the following configuration settings on your app service:您需要更新应用服务上的以下配置设置:

  • AzureWebJobsDashboard AzureWeb 作业仪表板
  • WEBSITE_CONTENTAZUREFILECONNECTIONSTRING WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
  • AzureWebJobsStorage AzureWeb 作业存储

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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