简体   繁体   中英

Can't access a basic Fabric Azure WebAPI OWIN stateless service

After following the tutorial , I've succeeded running it on localhost:8534/simpleprime/api/values/ * having the same result as the tut.

Later publishing the solution to a remote cloud cluster, I couldn't access it using www.clusterurl:8534/api/values , timing out each time. Even though I got reassuring event diagnostics from Visual Studio during the deploy.

I've also tried each of the nodes seperetly, going to http://node_ip:8543/simpleprime/api/values , without any luck

一堆令人放心的诊断

  • simpleprime is the appRoot

If you want to access your service with OWIN listener on Azure, you should define ports that will be used by your application for the LoadBalancer during cluster creation.

If you for some reason forgot you can do it later by:

SERVICE PART

  1. Go to PackageRoot/ ServiceManifest.xml of your service with OWIN Listener
  2. Define your endpoint directly (so SF will use your definied port number) (in my example 8081) 在此输入图像描述

  3. Re-publish application to Azure.

AZURE PART

  1. Go to Azure Portal
  2. Find the Load Balancer that is assigned to your SF (LB-nameofyourSF-namofNodeSet)
  3. In LoadBalancer settings go to Probes and add new probe like on the image below with your Port defined in ServiceManifest.xml ( on my example 8081 ) and Protocol TCP 在此输入图像描述
    1. Add new Load balancing rule with your port and probe defined earlier and the correct port mapping (in my example 8081):

在此输入图像描述

  1. Save and now you should be able to access your service on Azure via browser.

Finally solved it, inside the service port config (aka ServiceManifest.xml ) there is a port setting. After changing it to 19080 - the default http port my cluster was listening to, everything started working.

ServiceManifest.xml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM