部署到 Azure 时 Service Fabric 应用程序没有响应

No response from Service Fabric Application when deployed to Azure

我的 service fabric 应用程序在本地运行没问题: http://localhost:8080/api/values

当部署到 Azure 时,它​​只是坐着,我最终会超时。 http://cluster-myapp.centralus.cloudapp.azure.com/api/values

在四处挖掘之后,我发现了一些信息,表明 Azure 负载均衡器需要使用新规则和新探测器进行更新。我这样做了,但仍然是同样的问题。这是我拥有的:

ServiceManifest.xml

  <Resources>
<Endpoints>
  <!-- This endpoint is used by the communication listener to obtain the port on which to 
       listen. Please note that if your service is partitioned, this port is shared with 
       replicas of different partitions that are placed in your code. -->
  <Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="8080" />
</Endpoints>

我添加了一个Probe如下:

...和这个 LB 规则

我没有看到任何日志、错误或任何东西,所以我现在很困惑。任何帮助将不胜感激。

原来我的问题是由探测器上的 "Path" 设置引起的。我的 API 没有默认控制器,因此路径“/”返回 404。

我在我的网络中创建了一个 Ping 控制器 api 并将探测器上的路径更新为“/ping”,这让它开始工作了。

我觉得有点奇怪 "Service Fabric Explorer" 中没有报告 "health" 个问题,或者我在这里遗漏了什么?