quot;The function runtime is unable to startquot;(“函数运行时无法启动)
问题描述
我知道这可能与配置错误有关,但不幸的是,我得到的最多信息是
I know it probably has something to do with a misconfiguration, but unfortunately the most info I get is
函数运行时无法启动.会话 ID:b939c608ae424150878a55eeac6e7d36 时间戳:2018-10-04T18:05:22.023Z
The function runtime is unable to start. Session Id: b939c608ae424150878a55eeac6e7d36 Timestamp: 2018-10-04T18:05:22.023Z
我的函数看起来像
[FunctionName("DoJob")]
public static async Task DoJobAsync([ServiceBusTrigger("job-queue", Connection = "MyServiceBusConnection")] string json, ILogger log)
{
…
}
我的 local.settings.json 就像
and my my local.settings.json is like
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"AzureWebJobsDashboard": "UseDevelopmentStorage=true",
"MyServiceBusConnection": "[my service bus connection string]"
}
}
函数应用程序在本地构建并发布,但一旦我在门户中导航到它,就会收到上述错误.
The function app builds locally and publishes, but as soon as I navigate to it in the portal I get the above error.
我正在使用 .NET Standard (V2) 和最新版本 1.0.22.
I am using .NET Standard (V2) and the latest version 1.0.22.
另外,如果我尝试在门户中进行测试,我会收到 500 Internal Server Error 但日志流中没有显示任何内容.
Also, if I try to test in the portal I get 500 Internal Server Error but nothing shows up in Log Streaming.
推荐答案
如果没有任何进一步的信息,我假设您可能忘记在 Azure 门户的应用程序设置中添加 MyServiceBusConnection,这将导致与您相同的错误看到.
Without any further info, I assume you may forget to add MyServiceBusConnection in Application settings on Azure portal, which will cause same error you have seen.
如果不是这样,您可以转到 https://<functionappname>.scm.azurewebsites.net/DebugConsole 并导航到 D:homeLogFilesApplicationFunctionsHost 查看函数运行时日志.
If it's not the case, you could go to https://<functionappname>.scm.azurewebsites.net/DebugConsole and navigate to D:homeLogFilesApplicationFunctionsHost to see function runtime logs.
这篇关于“函数运行时无法启动"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“函数运行时无法启动"
基础教程推荐
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 将数据集转换为列表 2022-01-01
- 从 C# 控制相机设备 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
