Note that there are some explanatory texts on larger screens.

plurals
  1. POAzure Diagnostics doesnt transfer IIS logs to blob storage
    text
    copied!<p>Ok, I have been banging my head on this one for a while, figure I would ask if anyone has encountered this before.</p> <p>My configuration and setup is below. This is when deployed to the staging environment. I know that the logging is happening because I enabled RDP and I am able to go in and I can see the IIS logs created. However they do not transfer to blob storage, even though other diagnostics logs do without problem.</p> <p>In the infrastructure logs i can see the following error, which I'm told is only about the proxy and not relevant:</p> <pre><code>WinHttpGetProxyForUrl(http://mystorage.blob.core.windows.net) failed ERROR_WINHTTP_AUTODETECTION_FAILED (12180) </code></pre> <p>The other warning I see in the Event Viewer is:</p> <pre><code>-&lt;Event&gt; -&lt;System&gt; &lt;Provider Name="Microsoft-Windows-IIS-W3SVC-WP"Guid="{670080D9-742A-4187-8D16-41143D1290BD}"EventSourceName="W3SVC-WP"/&gt; &lt;EventID Qualifiers="32768"&gt;2283&lt;/EventID&gt; &lt;Version&gt;0&lt;/Version&gt; &lt;Level&gt;3&lt;/Level&gt; &lt;Task&gt;0&lt;/Task&gt; &lt;Opcode&gt;0&lt;/Opcode&gt; &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt; &lt;TimeCreated SystemTime="2011-02-18T22:46:34.000Z"/&gt; &lt;EventRecordID&gt;266&lt;/EventRecordID&gt; &lt;Correlation/&gt; &lt;Execution ProcessID="0"ThreadID="0"/&gt; &lt;Channel&gt;Application&lt;/Channel&gt; &lt;Computer&gt;RD00155D3273B5&lt;/Computer&gt; &lt;Security/&gt; &lt;/System&gt; -&lt;EventData&gt; &lt;Data Name="FailureCount"&gt;3&lt;/Data&gt; &lt;Data Name="Minutes"&gt;5&lt;/Data&gt; &lt;Data Name="Directory"&gt;\\?\C:\Resources\directory\345345kjh325kj5432452345.MyWebRole.DiagnosticStore\FailedReqLogFiles\Web\W3SVC1273337584\&lt;/Data&gt; &lt;Binary&gt;03000780&lt;/Binary&gt; &lt;/EventData&gt; &lt;/Event&gt; </code></pre> <p>This is a fairly simple WCF application running as a WebRole. The config looks like this:</p> <pre><code>&lt;system.diagnostics&gt; &lt;sources&gt; &lt;source name="System.ServiceModel" switchValue="Information,ActivityTracing" propagateActivity="false"&gt; &lt;listeners&gt; &lt;add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="ModelListener"&gt; &lt;filter type="" /&gt; &lt;/add&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;source name="System.ServiceModel.MessageLogging" switchValue="Information" propagateActivity="false"&gt; &lt;listeners&gt; &lt;add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="MessageListener"&gt; &lt;filter type="" /&gt; &lt;/add&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;/sources&gt; &lt;sharedListeners&gt; &lt;/sharedListeners&gt; &lt;trace autoflush="true" indentsize="3"&gt; &lt;listeners&gt; &lt;add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="TraceListener"&gt; &lt;filter type="" /&gt; &lt;/add&gt; &lt;/listeners&gt; &lt;/trace&gt; &lt;/system.diagnostics&gt; ... ... &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true" /&gt; &lt;tracing&gt; &lt;traceFailedRequests&gt; &lt;add path="*"&gt; &lt;traceAreas&gt; &lt;add provider="ASP" verbosity="Verbose" /&gt; &lt;add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" /&gt; &lt;add provider="ISAPI Extension" verbosity="Verbose" /&gt; &lt;add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module" verbosity="Verbose" /&gt; &lt;/traceAreas&gt; &lt;failureDefinitions verbosity="Warning" statusCodes="400-599" /&gt; &lt;/add&gt; &lt;/traceFailedRequests&gt; &lt;/tracing&gt; &lt;/system.webServer&gt; </code></pre> <p>I have also changed the listeners a few different ways, with the same outcome. So I dont think thats the problem, but im open to suggestions</p> <p>The code in the webrole looks like this:</p> <pre><code>public override bool OnStart () { // To enable the AzureLocalStorageTraceListner, uncomment relevent section in the web.config DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration(); //Windows Performance Counters List&lt;string&gt; counters = new List&lt;string&gt;(); counters.Add(@"\Processor(_Total)\% Processor Time"); counters.Add(@"\Memory\Available Mbytes"); counters.Add(@"\TCPv4\Connections Established"); counters.Add(@"\ASP.NET Applications(__Total__)\Requests/Sec"); counters.Add(@"\Network Interface(*)\Bytes Received/sec"); counters.Add(@"\Network Interface(*)\Bytes Sent/sec"); foreach (string counter in counters) { PerformanceCounterConfiguration counterConfig = new PerformanceCounterConfiguration(); counterConfig.SampleRate = TimeSpan.FromMinutes(1); counterConfig.CounterSpecifier = counter; config.PerformanceCounters.DataSources.Add(counterConfig); } config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); //Windows Event Logs config.WindowsEventLog.DataSources.Add("System!*"); config.WindowsEventLog.DataSources.Add("Application!*"); config.WindowsEventLog.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); config.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Error; //Azure Trace Logs config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Error; //Crash Dumps CrashDumps.EnableCollection(true); //IIS Logs //This was added in a desperation move but it has not made a difference with or without DirectoryConfiguration directory = new DirectoryConfiguration(); directory.Container = "wad-tracefiles"; directory.DirectoryQuotaInMB = 10; directory.Path = RoleEnvironment.GetLocalResource("AppLocalStorage.svclog").RootPath; config.Directories.DataSources.Add(directory); //end desperation move config.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); //infrastructure logs config.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); config.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Error; DiagnosticMonitor.Start("DiagnosticsConnectionString", config); // For information on handling configuration changes // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357. RoleEnvironment.Changing += new EventHandler&lt;RoleEnvironmentChangingEventArgs&gt;(RoleEnvironment_Changing); // This code is necessary to use CloudStorageAccount.FromConfigurationSetting CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =&gt; { configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)); RoleEnvironment.Changed += (sender, arg) =&gt; { if (arg.Changes.OfType&lt;RoleEnvironmentConfigurationSettingChange&gt;() .Any((change) =&gt; (change.ConfigurationSettingName == configName))) { if (!configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))) { RoleEnvironment.RequestRecycle(); } } }; }); return base.OnStart(); } </code></pre> <p>The <code>DiagnosticsConnectionString</code> is set properly as some of the tables and containers are created and populated properly. </p> <p>Any help is appreciated. Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload