azure - 对 Service Fabric 服务部署进行故障排除

标签 azure azure-service-fabric self-contained

我们有一个 ServiceFabric 服务,它运行最新的 .NET Core 3.1。我们将其发布并部署为独立的 x64 应用程序。最近更新后,我们无法再部署它。 ServiceFabric 给出的信息很少。这是我们看到的:

Service package for manifest 'XXXX' and service package activation ID 'XXXX' is in Error.
        'System.Hosting' reported Error for property 'ServiceTypeRegistration:XXX'.
        The ServiceType was disabled on the node.

它尝试了几次然后放弃了。 通过深入研究 SF 事件,我也发现了这一点:

There was an error during CodePackage activation.The process/container terminated with exit code:2147516556.

使用本地 Service Fabric 集群时,一切都部署得很好。

有人知道谁可以从部署过程中获取更多信息吗?更多日志。一些线索将帮助我们了解部署到底出了什么问题。

最佳答案

所以,我们的代码确实根本没有运行。因此,我们没有从中获得任何日志。但是,有一种方法可以从 Service Fabric 运行时本身获取一些日志。如此处所述:https://devblogs.microsoft.com/premier-developer/service-fabric-how-to-troubleshoot-deployment-errors-in-service-fabric-windows-cluster/#:~:text=Debug%20service%20errors%20using%20the%20log%20files我们添加了

<ConsoleRedirection FileRetentionCount="5" FileMaxSizeInKb="2048"/>

到我们的ServiceManifest.xml。结果,我们得到了一些有用的日志。特别是我们得到了这个:

Error:
  An assembly specified in the application dependencies manifest (XXXX.deps.json) was not found:
    package: 'Microsoft.Data.SqlClient.SNI.runtime', version: '2.0.0'
    path: 'runtimes/win-x64/native/Microsoft.Data.SqlClient.SNI.pdb'

这为我们提供了一些开始解决实际问题的线索。

关于azure - 对 Service Fabric 服务部署进行故障排除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62883691/

相关文章:

azure-devops - Service Fabric 应用程序部署超时

libraries - 科学计算 : Balancing Self-Contained-ness and Reuse?

netbeans - 如何将 "-ext WixUIExtension "添加到 Netbeans 中的 ant 脚本?

linux - 在 Docker 中部署交叉编译工具链

azure - 如何解决Azure函数 `Stream Too Long`错误

c# - 在 .Net 6.0 中的隔离进程 Azure Functions 中使用 Newtonsoft.Json

Azure VM 替换 : transfer IP address and FQDN

ruby-on-rails - 无法访问日志文件。请确保path/to/Production.log存在并且可写

c# - C# 中的 gRPC 子 channel 负载均衡

asp.net-core - OpenIddict:当两个或多个服务实例计数时出现 401 错误