“Role instances are taking longer than expected to start. Do you want to continue waiting?”
The above error message must be very familiar to the newbies of Windows Azure when they try to run Azure application in Azure emulator .When we search for this error msg, we get so many links which says the experience of resolving this error. My situation was also not exceptional .Among my team members only my machine got this disease.
When I opened the first link I could see a list of 14 check points to be corrected to get the emulator working. I went through each and every point and verified it.But no luck. There was an interesting solution that we need to opt for retry and it will work .I tried clicking on the Wait button 10-15 times without any luck. Another forum said this was an identified issue in Azure sdk 1.3 and fixed in 1.4 .But I am getting the issue even in Azure 1.5.
There were some guys who got it working by reinstalling the Azure sdk and some went to the extend of reinstalling OS. That was not my option because we are using a OS image which has some special softwares pre installed. So I tried to dig into the inner details of emulator working.
Inner details of Azure emulator
When I started digging into emulator the first thing I could see is it will create a temporary site in IIS 7.But when I looked in IIS, I was able to realize that the issue is with creating the temporary site for Azure emulator. After that I tried opening the system tray icon of emulator and checked the emulator console view by clicking on the ‘I’ button. There was nothing. Then I decided to check where are log files of Azure emulator?
It was simple the location of Azure emulator logs is
Now I got a bunch of error log files and started analyzing it and could see a good error (sometimes errors are better than nothing) from the \dftmp\DevFCLogs folder which said
“There is already a listener on IP endpoint 127.0.0.1:12001”
The next google took me to a strange msdn page which asked to me to free the below ports.
12000, 12001, 12002, 808, 16001, or 15100.
After freeing the ports I was able to run the application successfully in emulator .But look at the port 808 which I an using for net.tcp binding and essential for my other project.That means I need to change that port or work on only one project at a time. When I googled again I could see that there are some more people with same issue with the 808 port
If you follow the step by step instruction to install Azure sdk and got it working in the first shot, you are the lucky person in Azure world. Otherwise you are screwed especially if you are the coder. I was lucky that I am not the developer in that project and could survive some days by drawing boxes and arrows
If you are in the same situation where I was go through the Azure SDK 1.5 known issues and try the workarounds. Also look are the “Getting Started with Locally Running a Windows Azure Application” page in MSDN. Then start looking at the 14 check points mentioned above.Add the unblocking of ports as 15th check point. Finally goto the logs folder and google it. I don’t think there is any need to reinstall the OS.
My initial opinion about Windows Azure is, it’s a cloud in all means. An unclear dark cloud which may cause heavy rain at any time to which we are throwing our apps and data. Another complaint is about the Azure sdk which is not mature even in its v 1.5 to at least block the direct URL access to WCF REST service by configuration where ACS protects the service. Hope I can post more about Azure later.