Jerry Bian
Jerry Bian

Reputation: 4238

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:

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

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.

Upvotes: 3

Views: 689

Answers (1)

Jerry Bian
Jerry Bian

Reputation: 4238

Quote from MSDN forum:

Hey folks jumping it late here but just wanted to confirm that there was an issue with the initial 1.4.0.0 diagnostics extension where the plugin could crash on the web role under certain circumstances.

The issue has since been resolved with 1.4.1.0. If you re-apply the extension on the role you should automatically get the latest version which fixes the issue.

At early stage, the diagnostics in SDK 2.5.1 has some internal issue inside, but Microsoft already fixed it.

Anyway, we have newer version can be applied, so this is not a problem anymore, just in case you meet this issue too.

Upvotes: 1

Related Questions