Azure Functions门户错误-函数运行时无法启动 [英] Azure Functions Portal error - The function runtime is unable to start

查看:234
本文介绍了Azure Functions门户错误-函数运行时无法启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用VS 2017 Publish机制在消费计划上部署的VS 2017 C#开发的Azure Function应用程序。所有功能均由计时器或服务总线触发。我在Azure门户中看到正在运行的状态,并且功能似乎正在运行,例如将行写入SQL Azure数据库,但是,当尝试检查或监视功能时,例如在Azure门户中,我经常遇到错误。弹出红色错误框,并显示以下错误:

I have a VS 2017 C# developed Azure Function App deployed on the consumption plan using the VS 2017 Publish mechanism. All functions are timer or Service Bus triggered. I see a status of running in the Azure Portal and the functions appear to be working e.g. writing rows to a SQL Azure database, however, I am constantly encountering errors in the Azure Portal when trying to inspect or Monitor the functions e.g. a red error box pops up with the Error :

The function runtime is unable to start. 
Session Id : xxxxxxxx
Timestamp : xxxxxxx

我在日志中查看了并且在日志文件中看不到任何明显的内容,我尝试部署到新的App Service,并解决了一段时间,但问题又回来了。我将所有函数包装在异常处理程序中,并将异常消息包装到TraceWriter中,所有函数的执行速度都非常快,最多30-40秒。有时,我还会看到错误消息:您没有xxx权限。

I have looked in the logs and cannot see anything obvious in the log files, I tried deploying to a new App Service and that fixed the issue for a while but it has come back. I have wrapped all my functions in exception handlers and Exception messages to the TraceWriter, all functions are quite fast to execute ~ max 30-40seconds. Occasionally I have also seen errors saying "You do not have permission xxx".

任何帮助都很感激。

推荐答案

通过无数的东西。确实,您需要查看日志以查看潜在问题。

This issue can be caused by numerous things. Really you need to look into the logs to see the underlying issue.

这里的一个很好的调试选项是连接到实时流媒体。因此,在您的功能中,转到平台功能标签,然后在监控下选择日志流选项:

A good debugging option here is to connect to live streaming. So in your function go to Platform features tab and select the Log streaming option under Monitoring:

这会将实时流连接到函数日志记录:

This will connect a live stream to your functions logging:

在此处应看到标识为什么功能的日志无法启动

Where you should see logs identifying why the function is unable to start

这篇关于Azure Functions门户错误-函数运行时无法启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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