0
votes

In my location, connections to Azure servers are not good so i have to run an on-premises hosting. Whenever the hosting go down, i want an azure web app replace it. I use azure traffic manager with routing mode: Priority for that purpose.

The on-premise website is something like: basesite.com

The azure web app is something like: secondsite.azurewebsites.net

I have access all of these sites and they work well.

Trafficmanager work at something like: mysite.trafficmanager.net

At first, i create 2 endpoint:

1st Priority for basesite.com

2nd Priority for secondsite.azurewebsites.net

All the endpoint are enabled and monitor status are Online.

Now, i access mysite.trafficmanager.net and it return a 500 - Internal server error.

To investigate more, i have tried creating some default azure web app and add them as endpoints of traffic manager and it works perfectly as i expect. It looks like the issue just come with on-premise deployment (external endpoint).

I guess that there is some problem with my local hosting (configuration of server or DNS server...) but i don't have any clue to find out exactly.

How can i get more detail of the error from trafficmanager instead of just a meaningless 500 message?

UPDATE:

To check my on-premise as Juunas suggested, I deployed a static html on basesite.com. The result isn't different. It's ok when i access directly from basesite.com but failed via traffic manager.

2
Is your on-prem website certainly listening for requests to mysite.trafficmanager.net? Because that's what IIS sees in the Host header.juunas
The on-premise website (basesite.com) doesn't listen anything from mysite.trafficmanager.net. If i access basesite.com directly, it's ok. All configuration i just do on azure traffic manager only, nothing change to on-premise website.khoa_chung_89
Your app is returning the 500 error, not traffic manager. You should check the on-prem logs.juunas
As i described above, the app is ok when i access directly, also, the monitor status is online. The 500 error just come if i access the app via trafficmanager. Because of that, i think, the connection between trafficmanager and my on-premise server has problem.khoa_chung_89

2 Answers

0
votes

Unfortunately, I don't have a solution to your problem but I can tell you that if you are getting a 500 Internal Server Error the problem is on your site.

Azure Traffic Manager works at the DNS level so, if your browser managed to perform an HTTP request, that means that he got a valid DNS response from Azure Traffic Manager.

0
votes

If your On-Prem web site (basesite.com) is reachable and working fine from a standard internet connection, but when you try to access to it using the URL of Azure Traffic Mananger (ie: mysite.trafficmanager.net) you are receiving an error 500, maybe it is happening because your On-Prem webserver is hosting multiple websites using the same Public IP, in other words your webserver could be waiting for a specific host header in order to determine what is the correct website.

Having said that please take into account that Azure TM works in the DNS layer, it isn't a load-balancer, and you can check this out performing a PING to mysite.trafficmanager.net and you could see as result the IP of your TM Endpoint.

A possible solution should be add the Aure Traffic Manager hostname (mysite.trafficmanager.net) to your On-Prem WebSite.