Wednesday, May 8, 2013

Issue: Role instance doesn't even hit OnStart

Issue: In a Windows Azure app, some time it is seen that the role doesn't even start. On observing the VM on the Emulator, these statements are seen:


[fabric] Role Instance: deployment18(1424).PremierWorker.BackgroundWorker.0
[fabric] Role state Busy
[Diagnostics]: UpdateState(Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorStartupInfo, Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorConfiguration, )
[Diagnostics]: Acquired mutex
[Diagnostics]: Creating config channel server
[MonAgentHost] Output: Agent will exit when WADDM-ShutDown-6628f4899c2a4eeb9dc0ce93dca7aebc is signaled.
[MonAgentHost] Output: Will signal WADM-StartUp-6628f4899c2a4eeb9dc0ce93dca7aebc after the agent is initialized.
[MonAgentHost] Output: Registered as an event consumer.
[MonAgentHost] Output: Agent will exit when parent process 7544 exits.
[MonAgentHost] Output: Monitoring Agent Started
[Diagnostics]: Starting configuration channel polling
[runtime] Role entrypoint . CALLING   OnStart()
[runtime] Role entrypoint . COMPLETED OnStart()
[runtime] Role entrypoint . CALLING   Run()
[runtime] Role entrypoint . COMPLETED Run() ==> ROLE RECYCLING INITIATED
[runtime] Role instance recycling is starting
[runtime] Role entrypoint . CALLING   OnStop()
[runtime] Role entrypoint . COMPLETED OnStop()
[fabric] Role state Destroyed

Solution: After trying out everything on the net, it was finally understood that the issue was caused solely because we had upgraded from Windows Azure 1.8 to 2.0, but the Azure project wasn't upgraded.
To upgrade it, simply right-click the Azure solution, select "Properties" and then hit the Upgrade button on the screen displayed. :)

2 comments:

  1. Thanks man. You saved me a few sleepless nights.

    ReplyDelete
  2. Thanks A LOT!!! I was upgrading from 2.0 to 2.1 and had the same problem - you solution worked!!!

    ReplyDelete