Connecting an NServiceBus gateway on an Azure Service Fabric stateless service
Asked Answered
W

1

0

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.

Whang answered 10/1, 2017 at 23:21 Comment(1)
I've added a response to your question on GG post here: groups.google.com/forum/#!topic/particularsoftware/Pqsu5l6c0-8Calci
H
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.
Hall answered 11/1, 2017 at 7:54 Comment(1)
Looks like I needed a listener. The external service now seems to send the message fine, no errors coming back. Although it's not being picked up in service fabric by the gateway listener. Any insights into what the listener should do to make the gateway work?Whang

© 2022 - 2024 — McMap. All rights reserved.