Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

General Steps to investigate problems with Windows Azure Diagnostics

General Steps to investigate problems with Windows Azure Diagnostics

Rate This
  • Comments 2

After you enable Windows Azure Diagnostics with Web and/or Worker Role please make sure to use correct Windows Azure Storage account and key. After it, please run your web or worker role in compute emulator and then verify at Windows Azure Storage for any diagnostics details. This way you can assure the Azure diagnostics is working within the role and diagnostics data is logged at Windows Azure Storage.

Here are a few things you can verify:

1. Now after you deploy your application to Windows Azure and experience problems with Windows Azure Diagnostics, you can RDP to your Windows Azure machine to verify DiagnosticsAgent.exe is running.

2. While you are still in your Windows Azure VM please look at the following folder for <RoleHostProcessName>.log for any error with Windows Azure Diagnostics:

C:\Resources\temp\<Your_Deployment_GUID>.MainWebRole\RoleTemp\*

3. Windows Azure Diagnostics use Blob Storage and Table Storage so it is always good to check if Storage Emulator is working correctly or not. Please start your Azure Storage already before starting the debugging process using:

  • Launch Windows Azure SDK command prompt in Administrator mode
  • Type dsinit as below and see Azure Storage Emulator is started correctly

4. In your development machine please try editing your service configuration to target a real storage account for "Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" setting.

5. Please make sure the storage account is not set to "UseDevelopmentStorage=true". 

  1. On local Machine: Check your Service Configuration file to validate it.
  2. On Windows Azure VM: Checking the role config file on the Azure VM under C:\Config to validate it.

6. Check the blobs in the wad-control-container blob container in the diagnostics storage account. 

  • You are looking for the blob named with the <deploymentID>/<RoleName>/<RoleInstance> (ie. <Deployment_GUID>/WebRole1/WebRole1_IN_0).
  • Note: This should be done after you have copied files from Windows Azure Storage to your Local Machine using a tool i.e. Azure Storage Explorer:
  1. Open the XML file and make sure it is configured the way you expect.  If you see <ScheduledTransferPeriodInMinutes>0</ScheduledTransferPeriodInMinutes> for a given data source, it means that the diagnostics are not configured to transfer any data.
  2. If you have multiple instances, and some of them are transferring diagnostics, but others are not, compare the XML files to make sure they are both configured correctly.

7. Check the logs in the WADDiagnosticInfrastructureLogsTable table in the diagnostics storage account and filter on DeploymentId GUID.

  • Note: This should be done after you have copied files from Windows Azure Storage to your Local Machine using a tool i.e. Azure Storage Explorer:
  • You are looking for any exceptions or error messages which might indicate why diagnostics are not being transferred.

8. A common problem is not querying the diagnostics storage correctly, thus returning no results and assuming that diagnostics are not being captured. 

  • Please verify separately that your diagnostics storage account credentials are correct and you can query diagnostics tables, filtering on DeploymentID, and validate if diagnostics are getting transferred correctly or not.  The common mistakes when querying diagnostics are: Not filtering on DeploymentID, Not following continuation tokens.

9. If you have multiple instances and only a few of them aren’t transferring diagnostics correctly, you can try to Reimage the VM from the Management Portal.  This might fix the issue, but then you will lose the ability to determine root cause for why the problem was happening.  This should be used as a last resort.

If you still see the problem please contact Windows Azure Support Team @ https://support.microsoft.com/oas/default.aspx?gprid=14928&st=1&wfxredirect=1&sd=gn

Suggest Tools to Access Azure Diagnostic data from Windows Azure Storage:

-           Azure Storage Explorer @ http://azurestorageexplorer.codeplex.com/

Leave a Comment
  • Please add 8 and 3 and type the answer here:
  • Post
Page 1 of 1 (2 items)