1

我们有一个 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 群集时,一切都部署得很好。

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

4

1 回答 1

3

所以,确实我们的代码根本没有运行。因此,我们没有从中获得任何日志。但是,有一种方法可以从 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%20我们添加的文件

<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'

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

于 2020-07-15T09:29:43.780 回答