问题描述

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. CentOS确认网口是否插入网线的办法

    最近公司的机器存在网络问题, 部分网络总是不通, 比较奇怪. 最近一直想处理好. 第一步: 先查看网口的设备信息 可以使用 ip link show 可以讲网口信息都展示出来. 一般情况下  NO-C ...

  2. Mybatis 拦截器实现单数据源内多数据库切换 | 京东物流技术团队

    物流的分拣业务在某些分拣场地只有一个数据源,因为数据量比较大,将所有数据存在一张表内查询速度慢,也为了做不同设备数据的分库管理,便在这个数据源内创建了多个不同库名但表完全相同的数据库,如下图所示: 现 ...

  3. linux如何配置ssh密钥登录

    为什么要用ssh密钥登录 购买的服务器设置密码很容易被暴力破解,用密钥登录安全很多.root用户新建的用户也要用密钥登录更安全,如果一直su - 用户名登录 不方便 用xftp等服务上传文件到用户使用 ...

  4. windows幻灯片壁纸

    设置为10秒 win+r输入regedit 查找路径 HKEY_CURRENT_USER\Control Panel\Personalization\Desktop Slideshow 修改inter ...

  5. 快捷方式 ABP——切换MySQL数据库

    当基于ABP开发一段时间后,切换数据库可以使用快捷方式 方法如下: 第一步: 前提是要知道所使用的数据库的版本 1. vs 2017需要点击XXX.XXX.EntityFrameworkCore,右键 ...

  6. 【Java】先return还是先finally

    之前调试只发现有的方法执行完return语句后再执行finally,但是没有细究 最近debug代码的时候发现,不同返回类型的方法,return和finally执行顺序竟然不一样 先看返回类型为voi ...

  7. 2.1 CE修改器:精确数值扫描

    本关是CE修改器的第一关,用户需要通过 Cheat Engine 工具完成精确扫描值.在这个练习中,需要将一个特定的数值(健康值)改变为 1000.首先,要确保数值类型设置正确,默认的是2字节或4字节 ...

  8. LyScript 计算片段Hash并写出Excel

    本案例将学习运用LyScript计算特定程序中特定某些片段的Hash特征值,并通过xlsxwriter这个第三方模块将计算到的hash值存储成一个excel表格,本例中的知识点可以说已经具备了简单的表 ...

  9. [XXL-JOB] 项目集成-Framework

    1.导入pom坐标 <dependency> <groupId>com.hbasesoft.framework</groupId> <artifactId&g ...

  10. ubuntu系统单网卡配置多网段IP

    环境 系统版本:Ubuntu 16.04.5 LTS 配置 ubuntu系统网卡文件是interfaces,修改网卡配置文件vim /etc/network/interfaces添加2个IP地址: a ...