Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure: Worker role looping through "recycling"

I'm currently working on an Azure project that works 100% locally with emulator resources. I'm now trying to deploy a worker role, but I'm running into an issue that I'm not sure how to troubleshoot.

Upon deploying the worker role in my Azure portal, the two instances continually loop through "recycling".

I can try to RDP into the role, but I only have about a minute to look around before the connection closes, I'm assuming due to the recycling.

After some searching it doesn't seem like this is a super common problem. Is there something trivial I'm overlooking that could be causing this issue? How would you go about troubleshooting this? Thank you for your time :)

like image 893
RobVious Avatar asked Jun 20 '12 15:06

RobVious


2 Answers

In case of missing Reference you can troubleshoot this issue by:

Unzip your CSPKG file and then again unzip .CSSX file (just rename CSSX to zip) and match that everything references and static content is all there.. This way you can match what is on VM. Also in 2 minute windows when you RDP, try to look for Application event log for exception and get it because that would be the key to find the root cause.

IF you could see the exception in event log and look for the exception, you sure can find where it was generated. You can also use Intellitrace which might require you to redeploy the app.

Also there are ways were copying WinDBG and locking to the specific process you can debug it. I am not sure how much you would want to try but just copy the WinDBG to VM and use it would be enough (not sure how much experience you have with WinDBG though and how much time you would want to spent.)

like image 52
AvkashChauhan Avatar answered Nov 12 '22 13:11

AvkashChauhan


Also been pestered by this role recycle issue numerous times. Here is the sequence of steps to debug persistent role recycles:

Debugging Azure Role Recycles

  1. Enable Remote Access to your role - RDP login
  2. Check eventvwr.msc (Windows Logs -> Application, App & Service Logs->Windows Azure)
  3. Review the Azure text file logs across both C:\logs and c:\resources
  4. Review custom logs in the Volume E: or F: for any custom role startup logging
  5. Run AzureTools and attach to startup processes (download WinDBG, use Utils->Attach Debugger, select process - WaWorkerHost/WaIISHost, etc), use G to continue and watch debugger output for assemblies failing to load.

    Installing Azure Debugging Tools via Powershell

    PS> md c:\tools; Import-Module bitstransfer; Start-BitsTransfer http://dsazure.blob.core.windows.net/azuretools/AzureTools.exe c:\tools\AzureTools.exe; c:\tools\AzureTools.exe

If all items above fail - try using other tools in the AzureTools treasure trove - such as fusion logging, etc, this approach above will work!

WinDBG Sample Output - Failing to Locate Assembly (WaIISHost)

enter image description here

like image 39
SliverNinja - MSFT Avatar answered Nov 12 '22 12:11

SliverNinja - MSFT