Connecting an NServiceBus gateway on an Azure Service Fabric stateless service

我们两清 提交于 2019-12-25 09:36:41

问题


We are running into difficulties when trying to set up a gateway. I can get it running fine locally, similar to the documentation you provided, but once I need to change the localhost addresses, things start to break down.

Our first endpoint runs on a Windows Service (external service), our other endpoint runs on the Azure Service Fabric, specifically within a Stateless service running Web API. We are accessing the service through a remote proxy, which is necessary to contact a service within service fabric from outside service fabric. This works fine, as I am able to access my Web API controllers and actions through the reverse proxy port, but I keep getting 504 Gateway Timeouts for the Gateway channel.

In my external service, I define a Site with the address

http://clustername.azure.com:19008/MyApp/MyApiService/FCS.Fueling/

In my Azure Service Fabric Web API stateless service, the channel is set up with the address

http://clustername.azure.com:8424/MyApp/MyApiService/FCS.Fueling/

19008 is the reverse proxy port. If I navigate to http://clustername.azure.com:19008/MyApp/MyApiService/api/values values are returned and the service is running fine.

8424 is the port of the API inside service fabric. I've also tried 19008 for the incoming channel, to no avail.

FCS.Fueling is just a channel endpoint I've specified. In localhost, both of the endpoints being http://localhost:25000/FCS.Fueling worked, messages were received successsfully between my service fabric and external service.

I've tried all sorts of combinations of localhost, removing the FCS.Fueling bit, different ports I keep getting 504 Gateway timeouts.


回答1:


To talk to services inside SF using the reverse proxy is optional (but useful). It abstracts varying service endpoints by routing requests.

  • Check if there's a load balancing rule and a health probe for your endpoint.
  • Enable LB diagnostics to see if the health probe reports a healthy state.
  • Verify that the service is configured with an Endpoint that exposes the correct fixed Port and the http UriScheme.


来源:https://stackoverflow.com/questions/41580204/connecting-an-nservicebus-gateway-on-an-azure-service-fabric-stateless-service

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