ERR_CONNECTION_TIMED_OUT when trying to access a Service Fabric service

拈花ヽ惹草 提交于 2019-12-25 04:43:23

问题


I started to play with Service Fabric very recently. I added a new Service Fabric cluster on Azure (unsecure) and I created a demo solution with 2 stateless Web API Services as follows:

Endpoint configuration for AnotherAPI is the following:

<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="8698" />
</Endpoints>

I am able to access to the default controller (ValuesController) using the local endpoint:

http://localhost:8698/api/values

But when I try to use the azure endpoint I get an ERR_CONNECTION_TIMED_OUT error on Chrome.

http://{azure-ip-address}:8698/api/values

Is there anything that I am missing?


回答1:


You have to open that port in your azure cluster via a Load Balancer Probe. You can do this at cluster creation time via ARM template or after the fact. For an existing cluster, go to the resource group, then the LB Balancer, then probes. The default open port in SF is 19080 though. If you just switch to that port it will work if you are not using SSL.



来源:https://stackoverflow.com/questions/38070891/err-connection-timed-out-when-trying-to-access-a-service-fabric-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!