简体   繁体   English

Service Fabric群集上的多个实例时出现“ TargetInvocationException”

[英]'TargetInvocationException' when multiple instances on Service Fabric cluster

TargetInvocationException getting thrown at the owincommunicationlistener class when multiple instances are created on the service fabric cluster, if i set the instance count to 1 , everything is fine. 在服务结构集群上创建多个实例时,在owincommunicationlistener类上引发TargetInvocationException,如果我将实例计数设置为1,一切都很好。 but when i increase it, the Exception gets thrown at the point where the web server starts. 但是当我增加它时,Web服务器启动时会抛出异常。

Inner exception shows "Failed to listen on prefix 'htto://+:8961' because it conflicts with an existing registration on the machine" 内部异常显示“由于与计算机上的现有注册冲突而无法侦听前缀'htto:// +:8961'”

On Windows, Service Fabric leverage http.sys capabilities for HTTP listeners, make sure you follow the rules of http.sys. 在Windows上,Service Fabric将HTTP.sys功能用于HTTP侦听器,请确保您遵循http.sys的规则。 When running multiple instances (from different nodes) on the same machine, you need to have unique HTTP URL to prevent conflicts. 在同一台计算机上运行多个实例(来自不同节点)时,您需要具有唯一的HTTP URL以防止冲突。 As a guideline, the following link explains how http.sys works: https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a2a45c42-38bc-464c-a097-d7a202092a54.mspx?mfr=true 作为指导,以下链接说明了http.sys的工作方式: https : //www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a2a45c42-38bc-464c-a097-d7a202092a54.mspx? mfr = true

Same mechanism is used by IIS, but you don't need IIS to leverage Http.sys. IIS使用相同的机制,但是您不需要IIS来利用Http.sys。

Consider working in single node mode locally to work around the issue. 考虑在本地以单节点模式工作以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM