首页 > 其他分享 >【Azure Cloud Service】部署云服务时候遇见 Last exit code: 0. Last role exception: (System.IO.FileNotFoundExcept

【Azure Cloud Service】部署云服务时候遇见 Last exit code: 0. Last role exception: (System.IO.FileNotFoundExcept

时间:2024-03-27 20:44:06浏览次数:21  
标签:exception code Last System role exit ExecutionContext

问题描述

部署云服务时候遇见 Last exit code: 0. Last role exception: (System.IO.FileNotFoundException) 错误,提示无法加载System.Runtime。

Recovering role... Application startup task 0 finished successfully. 
Last exit time: [2024/03/27, 20:23:31.142]. Last exit code: 0. Last role exception: (System.IO.FileNotFoundException)|>Process ID: 221

Process Name: WaIISHost

Thread ID: 1

AppDomain Unhandled Exception for role WebApiWebRole_IN_0

Exception: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

   at WebApiWebRole.WebRole.OnStart()

   at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum)

   at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.<InitializeRole>b__0()

   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

   at System.Threading.ThreadHelper.ThreadStart()

 

 

问题解答

原因 2:DLL 或程序集缺失

(Source: https://learn.microsoft.com/zh-cn/troubleshoot/azure/cloud-services/extended/role-startup-failure#cause-2-dlls-or-assemblies-are-missing)

无响应的角色实例和在状态之间循环的角色实例可能是由于缺少 DLL 或程序集而导致的。

下面是缺少 DLL 或程序集的一些症状:

  • 角色实例将循环访问 “正在初始化”、“ 忙碌”和 “正在停止” 状态。

  • 角色实例已移至 “就绪” 状态,但页面在 Web 应用程序中不可见。

根据云服务的排查 " DLL 或程序集缺失  " 的文档,排查没有Dll遗漏,所以还是没有解决此问题。

最后,把启动项变更为 webRole 后,部署成功。但确实没有道理,因为Project中的启动项设置与打包后的部署文件并没有关系。

PS: 。。。 一直在困惑中 。。。

 

参考资料

排查 Azure 云服务中的角色实例启动失败问题  : https://learn.microsoft.com/zh-cn/troubleshoot/azure/cloud-services/extended/role-startup-failure#cause-2-dlls-or-assemblies-are-missing

 

标签:exception,code,Last,System,role,exit,ExecutionContext
From: https://www.cnblogs.com/lulight/p/18100188

相关文章

  • ElasticSearch的搜索相关操作
    1、基本介绍Elasticsearch的查询是基于JSON风格的DSL(DomainSpecificLanguage)来实现的。常见的查询类型包括:查询所有:查询出所有数据,一般测试用。例如:match_all全文检索(fulltext)查询:利用分词器对用户输入内容分词,然后去倒排索引库中匹配。例如:match、multi_match精确......
  • 【异常】IDEA链接TDengine提示SQLException: JNI ERROR (0x2354): Version not compat
    一、异常内容TDEngine提示SQLException:JNIERROR(0x2354):VersionnotcompatibleCausedby:java.sql.SQLException:JNIERROR(0x2354):Versionnotcompatible atcom.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:90) atcom.taosdata.jdbc.TS......
  • 二进制部署elasticsearch集群
    部署elasticsearch7.17.3版本背景:  业务有需求看evenet事件,由于etcd集群中的eventkey频繁打到200w+,对etcd集群压力非常大,每次都需要手动删除eventkey,非常耗时间,而且风险特别好,恢复时间慢等缺点。解决方案:  1,拆分etcd集群中的eventkey,在本机上创建一个新的etcd集群,......
  • Codeforces Round 936 (Div. 2)
    Preface懒狗闪总开完组会不打CF直接滚去睡觉了可海星,感觉我好像退化成我们队训练最少的人了赛后补了下发现这场题竟然都会做,不过F不知道是我实现有问题常数大得一批加了读优才惊险卡过A.MedianofanArray签到,找到中位数后面与它相同的数的个数即可#include<cstdio>#incl......
  • leedcode-第一个错误的版本
    自己写的二分法:classSolution:deffirstBadVersion(self,n:int)->int:#初始化左右指针进行二分查找left=1right=n#检查第一个版本是否是坏版本ifisBadVersion(1):return1#检查......
  • tomcat 启动报错javax.naming.NameNotFoundException: 名称[xxx.LoginFilter/xxxServi
    本地测试没问题,部署到服务器上的tomcat,启动报错javax.naming.NameNotFoundException:名称[xxx.LoginFilter/xxxService]未在此上下文中绑定可能是由于在Tomcat的配置文件中,资源名称[xxxx]没有正确配置或者引用。为了解决这个问题,你可以尝试以下步骤:1、检查你的Tomcat配置文......
  • 就是这么简单,Selenium StaleElementReferenceException 异常分析与解决
    简介Selenium是一个流行的自动化测试工具,用于模拟用户与网页交互。然而,当我们在使用Selenium时,可能会遇到一个常见的异常,即StaleElementReferenceException。这个异常通常在我们尝试与网页上的元素交互时抛出,可能会导致我们的自动化测试脚本运行失败。本文将深入探讨StaleE......
  • leetcode-75
    给定一个包含红色、白色和蓝色、共n个元素的数组nums,原地对它们进行排序,使得相同颜色的元素相邻,并按照红色、白色、蓝色顺序排列。我们使用整数0、1和2分别表示红色、白色和蓝色。必须在不使用库内置的sort函数的情况下解决这个问题。示例1:输入:nums=[2,0,2,1,1,......
  • Elasticsearch 8.x以上实现初始化用户密码,elasticsearch-setup-passwords interactive
    Elasticsearch8.x以上,默认自动开启x-pack验证,在首次启动时,会设置密码,当再次执行elasticsearch-setup-passwordsinteractive就会报错,提示使用elasticsearch-reset-passwords,但是用户太多,还是想要能像8.x以下一直敲回车,设置密码。今天偶然Elasticsearch报错,发现一个方法可以使用,......
  • elasticsearch esrally 性能测试实操
    目录准备数据docker测试环境准备正式测试最新在用esrally测试es的性能,今天把相关操作记录下。本人非专业测试,各位大佬请轻喷。关于esrally的文档,请移步:esrally测试esrally是个elastic官方的测试工具,可以对es进行压力测试。其运行对环境有一定要求,如python版本,JDK......