函数的侦听器无法启动.为什么? [英] The listener for function was unable to start. Why?

查看:25
本文介绍了函数的侦听器无法启动.为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从 Visual Studio 运行 azure 函数时出现以下错误.

I'm getting the following error when I run the azure function from visual studio.

发生 ScriptHost 错误 [1/19/2018 6:40:52 AM] 侦听器函数MyFunctionName"无法启动.Microsoft.WindowsAzure.Storage:服务器遇到内部错误.请过一段时间再试.

A ScriptHost error has occurred [1/19/2018 6:40:52 AM] The listener for function 'MyFunctionName' was unable to start. Microsoft.WindowsAzure.Storage: Server encountered an internal error. Please try again after some time.

当我通过运行 func host start 命令从命令提示符运行时.我收到以下警告.然后它卡在

When I run from the command prompt by running func host start command. I get the following warning. and then it gets stuck on

通过实例 ID 获取主机锁租约

Host lock lease acquired by instance ID

.

未找到工作职能.尝试让你的工作类和方法民众.如果您使用绑定扩展(例如 ServiceBus、Timers、等)确保您已调用注册方法启动代码中的扩展(例如 config.UseServiceBus(),config.UseTimers() 等).

No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).

Azure 函数版本:azure-functions-core-tools@2.0.1-beta.22我正在使用存储帐户 Blob 容器和队列.

Azure function version: azure-functions-core-tools@2.0.1-beta.22 I'm using Storage Accounts Blob containers and queues.

我正在连接到开发存储帐户,我已检查存储模拟器已启动.

I'm connecting to Development Storage account, I have checked it that storage emulator is started.

{
  "IsEncrypted": false,
  "Values": {
    "ConnectionStrings:Default": "Server=.\SQLEXPRESS; Database=TestDb; Trusted_Connection=True;",
    "ConnectionStrings:BlobStorageAccount": "UseDevelopmentStorage=true",

    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "AzureWebJobsDashboard": "UseDevelopmentStorage=true",
  }
}

仅供参考.

以前运行良好,但我在 Visual Studio 中收到了这条消息.

It was working fine before, But I have got this message in Visual Studio.

您的许可证已经过时,必须更新.检查更新继续使用本产品的许可

your license has gone stale and must be updated. Check for an updated license to continue using this product

所以我只是删除了%localappdata%%temp%,然后我尝试运行Azure函数,之后,我开始得到

So I just deleted the %localappdata% and %temp%, then I tried to run Azure function and after this, I have started getting

函数监听器无法启动错误

The listener for function was unable to start error

所以这与我的 Visual Studio 订阅有关还是我错误地删除了任何必需的文件?或者这与其他事情有关吗?

So is it related to my visual studio subscription or I mistakenly deleted any required file? Or is this related to something else?

推荐答案

对于遇到此问题的任何人,以下内容可能会有所帮助...

For anyone that is encountering this issue the following may help...

Azure Durable Functions 依赖于 TableStorage,而最新版本的 Azurite (v3) 目前不支持 TableStorage.因此,拉取 Azurite 存储库并切换到 legacy-master (v2) 分支,然后运行 ​​npm run start.

Azure Durable Functions rely on TableStorage, and the latest version of Azurite (v3) currently doesn't support TableStorage. As such, pull the Azurite repo and switch to the legacy-master (v2) branch and then run npm run start.

这篇关于函数的侦听器无法启动.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆