0
votes

I have a Cloud Worker role that I have deployed in different datacenters and I want to use the Azure Traffic Manager to send people to the closest data center to them (Performance balancing).

The worker roles are up and running and working well. I've tried adding an HttpListener on port 80 so the Traffic Manager has something to check the status. When I use RDC to connect to the VM that's running the Cloud Worker Service, I can hit 127.0.0.1:80 and get the OK message that I have it returning. However, when I hit the external url, 123456789abcdef.cloudapp.net, I get a 503 error.

I've set the process to run elevated so that it can open the port for the HttpListener, so that's not the issue.

I have an http endpoint set up for port 80, and the HttpListener is on port 80, as demonstrated by being able to hit 127.0.0.1:80 from the VM.

My question is two parts:

  1. Is this the right way to set up the Traffic Manager's status ports for a Worker Service?
  2. Why am I getting a 503 from the external hostname when I get a 200 from localhost on the VM?
1

1 Answers

1
votes

The issue is the site bindings in IIS manager. If you look at a webrole you will see a Binding for dip:port. If you look at the workerrole after you turn on IIS you will see a binding of *:port. This allows http://localhost to work, but not requests coming from the load balancer. If you edit the bindings to add the dip:port then it should work.

*note that dip = the internal ip address of the VM, which you can get from ipconfig.