Wednesday, August 4, 2010

“Page not found” or 502 when accessing an Azure Web Role

In the last week me and one of my collogue have been trying to nail down an issue when we try to access a simple Azure application from our Work network. I am posting it here as I think someone can benefit from this,

I literally just clicked through the Create New Project –> Next –> Next and created a “Simple” Cloud application with just a single Web Role and a Hello World page. Removed the diagnostic connection string that Azure adds by default just to make it even simpler. Basically the page just said “Hello World!” and nothing else was going on. Deployed the app on Azure and to my surprise it just didn’t work. I kept getting the default “Page not found”! Time to fire up fiddler and see what’s going on and here’s what Fiddler gives me,

[Fiddler] Connection to failed.
Exception Text: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Basically nothing much. Same deal when you use a tracert command.

And to add to that the app was just working fine from my iPhone. So we have an app that worked from an external network but didn’t from our corporate network with very little debugging info that one can point at. Luckily there was one service that we were able to hit from our corpnet and I logged into that and found that the only difference between that service and my “hello world” app was the affinity group.

Affinity group Details for the Service that DID NOT work:

Affinity group : mycustomaffinitygroup
Geographic Location: North/Central US

Affinity group Details for the Service that DID work:

Affinity group : Unaffiniated
Geographic Location: Anywhere in US

I changed the “hello world” to Unaffiniated and “anywhere in US” and wallah It started working. Now this SHOULD NOT happen. Either the North/Central data center was just slow to respond to requests from our internet gateway or there is something wonky with the custom affinity groups but either ways it’s BADD! Or a third reason could be the timeout value for our gateway before it closes the connection is set to a low value.. but not likely as I have never seen any issues with any other internet sites as such.

I have a thread going with Steve Marx from Microsoft here. Let’s hope he can track it down if at all it’s an issue with the Azure service. I hope not!

1 comment: