3

I have a problem deploying a WebRole (WCF service) to Azure. My WebRole keeps showing buzy for at least 30 minutes, until I abort it. I deploy through Visual Studio 2010. I’m looking for some trace information and there is a few blogs that have pointed me towards storage tables called WADInfrastructureLogsTable and WADLogsTable.

I have set up the configuration settings with my storage account like this:

 <ConfigurationSettings>
  <Setting name="DiagnosticsConnectionString"
    value="DefaultEndpointsProtocol=https;AccountName=sandsofttestservice;AccountKey=HgPjkzx+mjqgoDTO8SBNB3B4hdARuibWTOHrXg4BpxRKJfRZ/s4abVIoD5lOIW0LkoD0CoMb0i0GiTXA483MDQ==" />
</ConfigurationSettings>

I have no tables at all in my storage account. Not even after I have deployed Hello World apps successfully. My Blob container holds a vsdeploy- and a wad-control-container, and I have 4 queues.

How will these tables be created?

    public override bool OnStart()
    {
        var dm = DiagnosticMonitor.GetDefaultInitialConfiguration();
        dm.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(5);
        dm.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
        DiagnosticMonitor.Start("DiagnosticsConnectionString", dm);

        Trace.WriteLine("OnStart");
        // For information on handling configuration changes
        // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
        RoleEnvironment.Changing += RoleEnvironmentChanging;

        return base.OnStart();
    }
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Søren Randrup
  • 318
  • 2
  • 19
  • See my blog http://blogs.msdn.com/b/windowsazure/archive/2012/10/25/using-trace-in-windows-azure-cloud-applications-1.aspx You should not set the diag string in your web.config file. – RickAndMSFT Nov 20 '12 at 07:06

3 Answers3

2

Have you set up a transfer schedule for the Logs table? That is, all logging gets cached in each instance, and you need to explicitly ask for that data to be persisted in table storage on a periodic basis. Here's a trivial example for WADLogsTable:

        var dm = DiagnosticMonitor.GetDefaultInitialConfiguration();
        dm.Logs.ScheduledTransferPeriod = TimeSpan.FromSeconds(5);
        dm.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
        DiagnosticMonitor.Start("DiagnosticsConnectionString", dm);

Once this is set up, you should see the WADLogsTable table appear after a while.

You'll need to set up the transfer period and filter for each of the other types as well:

  • Event log
  • Diagnostics infrastructure log
  • Directories
  • Performance counters
David Makogon
  • 69,407
  • 21
  • 141
  • 189
  • Thanks for the answer. Now i have setup the scheduled transfer and i does not give me the WADLogsTable. I have also tried to create a fresh new storage but no luck there either. – Søren Randrup Nov 13 '10 at 14:27
  • 1
    1. Be sure to actually call Trace.traceInformational() (or any other level), maybe in your webrole.cs after calling DiagnosticMonitor.Start(), to generate something to transfer. Then wait a few minutes (without exiting your app). Occasionally it takes a few minutes for the tables to be created. – David Makogon Nov 13 '10 at 14:54
  • 1
    @DavidMakogon: Very helpful! Don't use Trace.WriteLine() or Trace.Write() but use Trace.TraceInformation, Trace.TraceError, Trace.TraceWarning. Without this will WADInfrastructureLogsTable note created – Anton Kalcik Feb 21 '12 at 15:00
2

I had a similar problem. I had the 'transfer' period set to 1 minute and it would not transfer. However, after I updated it to 5 minutes, I started seeing trace messages in the WADLogsTable. Not sure why that made a difference and haven't found any documentation that talks about a minimum transfer period, but 5 minutes worked for me.

Also make sure you have appropriate Trace.Writeline() statements in your web/worker role.

Tim Cochran
  • 1,834
  • 2
  • 15
  • 13
1

Soren - If you haven't already, you should probably regenerate your storage account access key. It is listed in your original post with your configuration details.

Another option to help diagnose your problem is Intellitrace. If you are using Visual Studio 2010 Utimate, you can enable Intellitrace with your deployment. This will let you download the Intellitrace log files, and from those you can see some pretty detailed information pertaining to the deployment and startup of your application. There might be some exceptions or other errors being generated that could be causing the prolonged "Busy" state.

mcollier
  • 3,721
  • 15
  • 12