Anil Maddala
Anil Maddala

Reputation: 908

Webrole is not starting and always busy

I am working on a Azure Web application. The code compiles and runs fine on my local machine. But when I upload the package in Azure Platform, the webrole wouldn't start and gives Busy status with the message: "Waiting for role to start... System is initializing. [2012-04-30T09:19:08Z]"

Both Onstart() and Run() don't contain any code. I am not blocking the return of OnStart.

However I am using window.setInterval in javascript. The javascript function retrieves the values from Database every 10 seconds.

What can be done to resolve this?

Upvotes: 5

Views: 6543

Answers (3)

David Makogon
David Makogon

Reputation: 71031

Two things to check:

  1. Make sure your diagnostics connection string is pointing to a real account, and not dev storage
  2. Check the session state provider in web.config. By default, it points to SQL Express LocalDB, which won't exist in Windows Azure.

Upvotes: 3

AvkashChauhan
AvkashChauhan

Reputation: 20571

In most of the situation when a Role (Web or Worker) is stuck, I have found the following steps very useful:

  1. Always add RDP access to your role because in some cases when role is stuck you still have ability to RDP your instance and investigate the problem by yourself. In some cases you could not RDP to your instance because dependency services are not ready yet to let you in. So if you have RDP enabled or could RDP to your instance please try to log you in.

  2. Once you have RDP to your instance. Get the local machine IP address and launch directly in browser. In internal IP address starts from 10.x.x.x so you can open the browser based on your endpoint configuration i.e. http://10.x.x.x:80 or https://10.x.x.x:443

  3. If you could not get into the instance over RDP then your best bet are to get the diagnostics info to understand where the problem could be. The diagnostics info is collected in your instance and sent to Azure Storage, configured by you in your WebRole.cs (in Web Role) or WorkerRole.cs (in Worker Role) code. Once diagnostics is working in your role, you can collect the Diagnostics data at your configured Azure Blob/Table storage to understand the issue.

  4. If you don't have RDP access and don't have any Azure Diagnostics configured (or could not get any diagnostics data to understand the problem) your best bet is to contact Azure Support team (24x7 via web or phone) at the link below and they will have ability to access your instance (with your permission) and provide you root cause.

https://support.microsoft.com/oas/default.aspx?gprid=14928&st=1&wfxredirect=1&sd=gn

When contacting Azure Support, please provide your Subscription ID, Deployment ID, your Azure Live Account ID and a small description of your problem.

Upvotes: 10

BrentDaCodeMonkey
BrentDaCodeMonkey

Reputation: 5513

The reason for this I run into the most is a missing or invalid assembly. But there are several great posts that can help disanosis this so I won't dive into the matter too deeply myself.

http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/6c739db9-4f6a-4203-bbec-eba70733ec16

http://blogs.msdn.com/b/tom/archive/2011/02/25/help-with-windows-azure-role-stuck-in-initializing-busy-stopped-state.aspx

http://blogs.staykov.net/2009/12/windows-azure-role-stuck-in.html

Upvotes: 0

Related Questions