5

I am getting the infamous "Role Instances are taking longer than expected" error when trying to start my Azure project with a single Worker Role. It used to work before, it started failing without any apparent reasons between two debug sessions.

I tried to create a brand new solution with a new Azure project and a default Worker Role, that also fails to start.

I have found numerous other SO questions and forum posts discussing this topic, but most of them are outdated and none of their suggestions worked.

I found no relevant message in the Event Logs, the only error message I found was in C:\Users\username\AppData\Local\dftmp\EmulatorRuntimeLogs\ErrorRuntime.log, it contains lots of lines like this:

[00006892:00014472, 2014/10/16, 18:40:45.247, ERROR] Failed to create FSRM quota manager instance.

The output for the role in the Compute Emulator displays the following log indefinitely:

[fabric] Role Instance: deployment24(4).MySolution.MyProject.MySolution.MyProject.0
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
[fabric] Role state Aborted
[fabric] Role state Busy
...

Do you have any suggestions what can cause this error with the latest 2.4 version of the Azure SDK?

Mark Vincze
  • 7,737
  • 8
  • 42
  • 81
  • FSRM is used for LocalStorage resources, and you implicitly get a LocalStorage resource when you have in the CSDEF. What happens if you get rid of that Diagnostics import? – kwill Oct 16 '14 at 22:11
  • I tried that but it didn't help, and same log messages. – Mark Vincze Oct 20 '14 at 11:22
  • Just an update: after long hours of googling/binging, I still haven't found any solution, so I cannot use the developer environment. I am thinking about reinstalling Windows (as other people seem to have done). – Mark Vincze Nov 26 '14 at 13:01
  • The solution here helped me. http://stackoverflow.com/questions/35391805/azure-role-not-starting-after-windows-update-10february – Ant Radha Feb 16 '16 at 12:53

3 Answers3

12

I solved it by removing the Startup Tasks from ServiceDefinition.csdef

Alex A
  • 325
  • 4
  • 11
  • This should be marked as answer, at least it has helped me and my collegues a number of times. – noocyte Mar 25 '15 at 12:19
  • I am using SDK 2.4 and I don't have a startup Tasks in ServiceDefinition.csdef. Is there a solution other than this? – Ant Radha Feb 16 '16 at 12:12
4

Change the taskType="background" in ServiceDefinition.csdef file

<Task taskType="background" executionContext="elevated" commandLine="sample.cmd">
nhahtdh
  • 55,989
  • 15
  • 126
  • 162
3

I didn't have a startup task and the following steps worked for me.

  • Right click the Azure Cloud service project
  • go to the "web" tab.
  • In the "Emulator" section choose "Use Full Emulator"
  • And in the "Local Development Server" section choose "Use IIS Web Server"

enter image description here

Ant Radha
  • 2,233
  • 1
  • 13
  • 16