尝试访问Service Fabric服务时出现ERR_CONNECTION_TIMED_OUT [英] ERR_CONNECTION_TIMED_OUT when trying to access a Service Fabric service

查看:144
本文介绍了尝试访问Service Fabric服务时出现ERR_CONNECTION_TIMED_OUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始玩Service Fabric.我在Azure(不安全)上添加了一个新的Service Fabric群集,并使用两个无状态Web API服务创建了一个演示解决方案,如下所示:

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:

AnotherAPI的端点配置如下:

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>

我可以使用本地端点访问默认控制器(ValuesController):

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

http://localhost:8698/api/values

但是当我尝试使用Azure端点时,在Chrome上出现ERR_CONNECTION_TIMED_OUT错误.

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

有什么我想念的吗?

推荐答案

您必须通过负载均衡器探针在Azure集群中打开该端口.您可以在群集创建时通过ARM模板或在创建之后执行此操作.对于现有群集,请转到资源组,然后进入"LB平衡器",然后进行探测.但是,SF中的默认开放端口为19080.如果您只是切换到该端口,则在不使用SSL的情况下也可以使用.

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.

这篇关于尝试访问Service Fabric服务时出现ERR_CONNECTION_TIMED_OUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆