diagnostics not working in web role for Azure SDK 2.5.1

I am working with Azure SDK 2.5.1, mainly on the new designed diagnostics stuffs. However, I found I cannot get it run for my web role.

So, I created a cloud service project, added a web role. Then, I appended one Trace message at the end of Application_Start in Global.asax.cs:

Trace.TraceInformaction("Application_Start end.");

After that, I right clicked the WebRole and opened the Properties tab. In the diagnostics config window:

  • General: I choose 'Custom plan', also specified the storage account, keep the 'Disk Quota in MB' as default '4096'
  • Application Logs: 'Log level' switch to 'All', others kept as default
  • Other tabs are in default config settings

After I deployed the project to cloud, I found some unexpected things:

  • There is no WADLogsTable exists in Table storage. That's very strange, if I use a Worker Role, it would work as expected. So in web role, I just cannot find the Trace logging?
  • For the performance counters, since I am using the default config with 8 counters, I can only see 8 in WADPerformanceCountersTable table storage. In my assumption, over time, there would be more and more values of this 8 counters transferred to this table. But it was just not happened, after several hours, it still had that 8 counter values.

I just thought the diagnostics for Web Role just crashed or not working at all. Meanwhile, I checked the logs located at "C:\Logs\Plugins\Microsoft.Azure.Diagnostics.PaaSDiagnostics\1.4.0.0\DiagnosticsPlugin.log" in server, at the end of this file there is an exception said some diagnostics process exit:

DiagnosticsPlugin.exe Error: 0 : [4/25/2015 5:38:21 AM] System.ArgumentException: An item with the same key has already been added.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.Azure.Plugins.Diagnostics.dll.PluginConfigurationSettingsProvider.LoadWadXMLConfig(String fullConfig)
DiagnosticsPlugin.exe Error: 0 : [4/25/2015 5:38:21 AM] Failed to load configuration file
DiagnosticsPlugin.exe Information: 0 : [4/25/2015 5:38:21 AM] DiagnosticPlugin.exe exit with code -105

From MSDN, the code -105 means:

The Diagnostics plugin cannot open the Diagnostics configuration file.

This is an internal error that should only happen if the Diagnostics plugin is manually invoked, incorrectly, on the VM.

It doesn't make sense, I did nothing to the VM.

As I said above, I just did very tiny changes to the scaffold code generated by Visual Studio 2013. Did I do something wrong or it's a bug for Azure SDK 2.5?

By the way, it seems everything is ok for Worker Role.

April 25th, 2015 3:46am

Hi,

  This issue could be an internal issue, I do not have any update on this as of now. There was a similar issue due to a regression last month that has been resolved, however i dont think this issue is related.
  Please follow the below article on how to enable Diagnostics and let us know if it works.
  http://azure.microsoft.com/en-in/documentation/articles/cloud-services-dotnet-diagnostics/
 
  I will let you know if I have any update on this issue from my side.
 
Regards,
Nithin Rathnakar.

Free Windows Admin Tool Kit Click here and download it now
April 26th, 2015 1:05am

Thanks. I read about the article, the worker role works fine for me.

I think it's very simple to reproduce this issue, just create a cloud service with only one web role, enable diagnostics and did very little settings. So if possible, can you try like this way, to confirm where the problem laid?

April 26th, 2015 1:48am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics