问题描述

Azure Function部署后未执行,查看日志发现错误信息:

2023-12-19T11:12:27.145 [Verbose] Host configuration applied.
2023-12-19T11:12:27.237 [Info] Starting Host (HostId=funapp-xxx-dev, Version=1.0.20776.0, InstanceId=xxx-x-xx-x-xxx, ProcessId=7924, AppDomainId=2, Debug=True, ConsecutiveErrors=0, StartupCount=1, FunctionsExtensionVersion=~1)
2023-12-19T11:12:27.102 [Verbose] Debug file watch initialized.
2023-12-19T11:12:27.222 [Verbose] File event source initialized.
2023-12-19T11:12:28.233 [Verbose] Function metadata read.
2023-12-19T11:12:28.345 [Verbose] Binding providers loaded.
2023-12-19T11:12:29.052 [Verbose] Binding providers initialized.
2023-12-19T11:12:29.052 [Info] Loaded custom extension 'BotFrameworkConfiguration'
2023-12-19T11:12:29.064 [Info] Loaded custom extension 'SendGridConfiguration'
2023-12-19T11:12:29.082 [Info] Loaded custom extension 'EventGridExtensionConfig'
2023-12-19T11:12:29.335 [Warning] Failed to load type 'xxxxx.xxxxx.xxxxx-1' from 'C:\home\site\wwwroot\bin\xxxxx.xxxxx.dll'
2023-12-19T11:12:29.335 [Warning] Failed to load type 'xxxxx.xxxxx.xxxxx-1' from 'C:\home\site\wwwroot\bin\xxxxx.xxxxx.dll'
2023-12-19T11:12:29.345 [Verbose] Extension loading complete.
2023-12-19T11:12:31.127 [Info] registered EventGrid Endpoint = https://funapp-export-dev.chinacloudsites.cn/admin/extensions/EventGridExtensionConfig
2023-12-19T11:12:31.847 [Verbose] Metadata provider created.
2023-12-19T11:12:32.407 [Verbose] Function descriptors read.
2023-12-19T11:12:32.407 [Info] Generating 0 job function(s)
2023-12-19T11:12:32.845 [Verbose] Development settings applied
2023-12-19T11:12:32.845 [Warning] 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.).
2023-12-19T11:12:33.423 [Info] Host initialized (6699ms)
2023-12-19T11:12:33.486 [Info] Host started (6761ms)
2023-12-19T11:12:33.486 [Info] Job host started
2023-12-19T11:12:33.552 [Error] The following 2 functions are in error:
ExportJob: The function type name 'xxxxx.xxxxx.xxxxx-1' is invalid.
RemoveBlobJob: The function type name 'xxxxx.xxxxx.xxxxx-1' is invalid.
2023-12-19T11:12:33.708 [Info] Host lock lease acquired by instance ID 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'.

问题解决

在日志中,发现Function Host的Version=1.0, 这是非常老的Function Runtime Version。 而本地使用的 3.0 版本,所以从这一点判断出是版本问题导致。
需要通过设置 FUNCTIONS_EXTENSION_VERSION 参数,来指定版本信息。

参考资料

How to target Azure Functions runtime versions: https://learn.microsoft.com/en-us/azure/azure-functions/set-runtime-version?tabs=portal#automatic-and-manual-version-updates

【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析的更多相关文章

  1. 【Azure App Service】C#下制作的网站,所有网页本地测试运行无误,发布至Azure之后,包含CHART(图表)的网页打开报错,错误消息为 Runtime Error: Server Error in '/' Application

    问题描述 C#下制作的网站,所有网页本地测试运行无误,发布至Azure之后,包含CHART(图表)的网页打开报错,错误消息为 Runtime Error: Server Error in '/' Ap ...

  2. 前段时间,接手一个项目使用的是原始的jdbc作为数据库的访问,发布到服务器上在运行了一段时间之后总是会出现无法访问的情况,登录到服务器,查看tomcat日志发现总是报如下的错误。    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected est

    前段时间,接手一个项目使用的是原始的jdbc作为数据库的访问,发布到服务器上在运行了一段时间之后总是会出现无法访问的情况,登录到服务器,查看tomcat日志发现总是报如下的错误. Caused by: ...

  3. 【Azure Developer】在Github Action中使用Azure/functions-container-action@v1配置Function App并成功部署Function Image

    问题描述 使用Github Action,通过 Azure/functions-container-action@v1 插件来完成 yaml 文件的配置,并成功部署Function Image 的过程 ...

  4. c# 调用EXCEL在VS上能正常运行,部署在IIS上不能实现,在VS中运行页面和发布之后在IIS中运行的区别

    发现一篇文章,很好,解决了这个问题:感谢原博主!特此做个笔记. 地址:http://www.cnblogs.com/zhongxinWang/p/3275154.html 发布在IIS上的Web程序, ...

  5. 将本地web项目发布到ubuntu上并运行 第一个本地的.net core2.0项目

    前置条件 ubuntu已安装dotnet 发布版本dotnet与发布机一致 这里用的是vm 所以直接把本地web项目拷贝到vm中运行的ubuntu系统中 web站点需要将 webapplication ...

  6. 运行powershell 脚本 在此系统上禁止运行脚本

    解决方法: 首次在计算机上启动 Windows PowerShell 时,现用执行策略很可能是 Restricted(默认设置). Restricted 策略不允许任何脚本运行. 若要了解计算机上的现 ...

  7. Azure Container App(一)应用介绍

    一,引言 容器技术正日益成为打包.部署应用程序的第一选择.Azure 提供了许多使用容器的选项.例如,我们可以使用 Azure 容器注册表来存储和管理 Docker Images.Azure Cont ...

  8. Chrome OS上可运行Linux

    说起Chrome OS,可能多数人第一时间联想的不是操作系统,而是在浏览器领域颇为流行的谷歌Chrome浏览器.其实,Chrome OS也是谷歌 旗下的一款产品,是一款Google开发的基于Linux ...

  9. 【Azure 应用服务】Azure Function App使用SendGrid发送邮件遇见异常消息The operation was canceled,分析源码逐步最终源端

    问题描述 在使用Azure Function App的SendGrid Binging功能,调用SendGrid服务器发送邮件功能时,有时候遇见间歇性,偶发性异常.在重新触发SendGrid部分的Fu ...

  10. 【Azure 应用服务】部署Kafka Trigger Function到Azure Function服务中,解决自定义域名解析难题

    问题描述 经过前两篇文章,分别使用VM搭建了Kafka服务,创建了Azure Function项目,并且都在本地运行成功. [Azure Developer]在Azure VM (Windows) 中 ...

随机推荐

  1. 一种读取亿级doris数据库的方法

    工作中,常常需要将线上doris同步至集市.读取doris数据同读取常规mysql基本相同.如果数据行小于千万,比较简单的方式直接单节点连接.读取和存储.Python示例如下: def get_dat ...

  2. Pytest 源码解读 [1] - [pluggy] 核心设计理念浅读

    背景: Pytest 是一个功能强大的 Python 测试框架,它使用了一个名为 "pluggy" 的插件系统来扩展其功能.在 Pytest 的源码中,pluggy 模块负责实现插 ...

  3. 【JVM】运行时内存分配

    程序计数器 用于标识线程执行到了字节码文件(class文件)的哪一行,当执行native方法时,值为undefined,各个线程私有 Java虚拟机栈 每个线程独有,每个方法执行时会创建一个栈帧,用于 ...

  4. MakeFile文件的使用 [补档-2023-07-13]

    makefile-gdb文件 ​ 可以在文件中指定那些文件可以先进行编译,那些文件可以后进行编译,那些文件可以重新编译.他可以自动化编译程序.... 6-1 makefile基本规则 ​ 如下: ​ ...

  5. 基于AQS实现自定义同步类

    Mutex(互斥锁) Mutex是一个不可重入的互斥锁实现.锁资源(AQS里的state)只有两种状态:0表示未锁定,1表示锁定.下边是Mutex的核心源码: class Mutex implemen ...

  6. linux笔记-工作

    根据进程id或进程名查看端口号 netstat -antup|grep 2073 netstat -antup|grep processName 查看某个端口号是否被占用 netstat -tln | ...

  7. Web入门:JavaScript文字动画

    欢迎来的我的小院,恭喜你今天又要涨知识了! 案例内容 利用JavaScript实现文字逐步展现的动画效果. 演示 学习 <!DOCTYPE html> <html lang=&quo ...

  8. 微信小程序 Path2D 不支持 svg 路径的解决办法

    问题 开发一个微信小程序项目的时候需要用到Path2D这个对象,但是发现小程序的Path2D对象不支持实例化的时候直接传入'svg path',导致下面的代码运行的时候报错(浏览器中可运行) #其它代 ...

  9. 关于大数乘法的数组类型问题(int 还是char)

    可以知道在处理高精度乘法的时候,我们是不考虑当场进位的,在所有位数都模拟完竖式乘法后才进行逐位进位,这就要求存储每个位的数组保证不会爆掉溢出 众所周知char类型最多只能存储到255,非常非常容易溢出 ...

  10. angularjs国际化多语言,angular-translate教程详解,$translate.instant()为什么不生效

    壹 ❀ 引 最近项目要求支持国际化多语言,由于项目用的还是angularjs,那么首当其冲的选择了angularjs封装的I18N插件angular-translate,本文主要会从三个方向展开讨论, ...