Derek Peirce
Derek Peirce

Reputation: 337

Endpoint after deploying an OWIN self-hosted Service Fabric application to the cloud

I'm able to run the example OWIN self-hosted Service Fabric application described here just fine locally, and see the results with HTTP requests to localhost as XML files. However, when I publish the application to a Service Fabric in the cloud, how do I make the same requests? My Service Fabric's endpoint is given to me as [fabric name].westus.cloudapp.azure.com:19000, so I tried [fabric name].westus.cloudapp.azure.com:19000/api/values, but it gave me a gibberish download file where I would expect the same XML file that I got before. The local ServiceManifest.xml file gives a port of 8760, which is what I use for localhost, but that hasn't worked on the cloud either, and the manifest that I see in the cloud doesn't have any port listed.

Upvotes: 2

Views: 1816

Answers (3)

Vaclav Turecek
Vaclav Turecek

Reputation: 9050

Port 19000 is a binary protocol that's used by the management tools. As others have said here, the thing you're missing is opening up your service's port (8760 in your case) publicly through the Azure load balancer and it must be configured as a custom port on each node that you want your service to run on. The Azure load balancer will route external traffic to every node that has the custom port specified, so you also have to make sure your service is running on each of those nodes. You can do that by using "-1" for the service's instance count.

Upvotes: 4

JoshL
JoshL

Reputation: 1716

When you created your Service Fabric cluster, did you specify a custom port number for your OWIN endpoint? This would be 8760 in your case:

specifying a custom SF endpoint port

Service Fabric allows you to specify a custom port using the above + specifying that port in the ServiceManifest.xml Endpoint definition, OR if you don't specify a port one will be assigned to your endpoint from the range of available port numbers for your SF application:

more details on endpoint port mapping in Service Fabric

Upvotes: 4

Xin Yan
Xin Yan

Reputation: 1

it sounds like you need to open port 8760 in the load balancer. Go to Azure portal, find the load balancer setting, and open the port. Then you can access via [fabric name].westus.cloudapp.azure.com:8760/api/values.

Upvotes: 0

Related Questions