c# - "The function runtime is unable to start"

标签 c# azure azure-functions azure-webjobs azure-functions-runtime

我知道这可能与配置错误有关,但不幸的是我得到的最多信息是

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 就像

{
    "IsEncrypted": false,
    "Values": {
      "AzureWebJobsStorage": "UseDevelopmentStorage=true",
      "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
      "MyServiceBusConnection": "[my service bus connection string]"
    }
}

函数应用程序在本地构建并发布,但是当我在门户中导航到它时,我收到上述错误。

我正在使用 .NET Standard (V2) 和最新版本 1.0.22。

此外,如果我尝试在门户中进行测试,我会收到 500 内部服务器错误,但日志流中没有显示任何内容。

最佳答案

如果没有任何进一步的信息,我假设您可能忘记添加 MyServiceBusConnection在 Azure 门户上的应用程序设置中,这将导致您看到的相同错误。

如果不是这样,您可以访问https://<functionappname>.scm.azurewebsites.net/DebugConsole并导航至D:\home\LogFiles\Application\Functions\Host查看函数运行时日志。

关于c# - "The function runtime is unable to start",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52652997/

相关文章:

c# - ASP.NET5 beta8 IServiceCollection 更改

c# - 使用 Try/Catch 检查文件是否存在

azure - 不同区域的VNET地址空间可以重叠吗?

reactjs - 通过 Azure CLI 基于 Azure DevOps git 存储库部署 ReactJs Azure 静态 Web 应用程序

azure - 查看 Azure KeyVault 中 Secret 的内容

c# - UDP 将帧从 OpenCv 发送到 EmguCv

c# - 如何使用 C# 在转发器控件中查找标签值?

node.js - Azure Function 如何根据命令启动更大的 Node.js 应用程序

python-3.x - 如何从 pytest 引用我的 Azure 函数?

python - 为什么 python azure 函数无法在本地运行?