Azurite:在使用 Azure Functions 时使用本地开发工具遇到巨大麻烦

问题描述 投票:0回答:1

我使用 Azurite 作为我的 azure 函数的本地存储(在本地开发时)。它似乎无法在我的一台机器上运行。我似乎无法弄清楚。

本地设置.json

看起来并没有什么太大的问题...

当我运行我的 Azure 函数代码时 - 我得到这个:

这看起来不健康。

另外,在 Visual Studio 中的服务依赖项中,我得到了这个:

我知道如果蓝铜矿已经在运行,它就无法重新运行它,但这种情况下的错误是不同的。我似乎无法运行任何功能。

虽然如果我使用另一台机器,那么它工作正常并且一切都很好 - 所以我认为它依赖于机器。 Windows 中是否有任何命令行可以检查这些端口上的内容以查看是否已有任何内容?我之前已经这样做过,但我看不到任何东西 - 只是徘徊是否有其他人遇到过这个?

当我第一次尝试启动我的函数时也遇到了这个错误

绝望正在降临:)

azure visual-studio azure-functions azurite
1个回答
0
投票

要解决此问题,请使用以下命令找到正在使用 端口 10001服务

netstat -p tcp -ano | findstr :10001

回复:

enter image description here

通过以下命令使用服务的 PID 终止任务:

taskkill /PID <process_id> /F

enter image description here

  • 使用以下命令测试蓝铜矿:
C:\Users\uname\pyfunc>"C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator\azurite.exe"
Azurite Blob service is starting at http://127.0.0.1:10000
Azurite Blob service is successfully listening at http://127.0.0.1:10000
Azurite Queue service is starting at http://127.0.0.1:10001
Azurite Queue service is successfully listening at http://127.0.0.1:10001
Azurite Table service is starting at http://127.0.0.1:10002
Azurite Table service is successfully listening at http://127.0.0.1:10002

参考资料:

https://learn.microsoft.com/en-us/answers/questions/698846/listener-for-azure-function-was-unable-to-start-er

© www.soinside.com 2019 - 2024. All rights reserved.