Cannot Update or Remove Diagnostics Extension

As of January 7th, I have been unable to update the diagnostics extension in my cloud service roles. This also issue has also made it impossible to deploy updates to cloud service roles from Visual Studio if diagnostics are enabled as Applying Diagnostics Extension always fails. A workaround is to disable diagnostics in all roles, deploy to staging, swap production and staging and then use PowerShell to apply the diagnostic extension with configuration. Enabling diagnostics from Visual Studio may work also but I haven't tried this.

This issue is also affecting auto-scaling when adding a new instance as it also fails to update the configuration. The auto-scaling repeatedly tries to perform the auto-scale operation.

Visual Studio

If I try to update the diagnostics configuration from Visual Studio Community 2013 it fails with the following message:

Updating Diagnostics extension to Role Web failed: The server encountered an internal error. Please retry the request.

Microsoft Azure PowerShell

PS C:\> Set-AzureServiceDiagnosticsExtension  sn Production Web -StorageContext $storageContext -DiagnosticsConfigurationPath $path
VERBOSE: Setting PaaSDiagnostics configuration for Web.
VERBOSE: 09:03:40 - Begin Operation: Set-AzureServiceDiagnosticsExtension
Set-AzureServiceDiagnosticsExtension : InternalError : The server encountered an internal error. Please retry the request.
At line:1 char:1
+ Set-AzureServiceDiagnosticsExtension  sn Production Web -StorageContext $st ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Set-AzureServiceDiagnosticsExtension], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServiceDiagnosticsExtensionCommand

VERBOSE: 09:04:12 - Completed Operation: Set-AzureServiceDiagnosticsExtension

PS C:\> Remove-AzureServiceDiagnosticsExtension  sn Production Web
WARNING: Removing PaaSDiagnostics configuration for Web from Cloud Service sn.
VERBOSE: 09:06:45 - Begin Operation: Remove-AzureServiceDiagnosticsExtension
Remove-AzureServiceDiagnosticsExtension : InternalError : The server encountered an internal error. Please retry the request.
At line:1 char:1
+ Remove-AzureServiceDiagnosticsExtension  sn Production Web
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureServiceDiagnosticsExtension], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.RemoveAzureServiceDiagnosticsExtensionCommand

VERBOSE: 09:07:17 - Completed Operation: Remove-AzureServiceDiagnosticsExtension

PS C:\> Remove-AzureServiceDiagnosticsExtension  sn -UninstallConfiguration
WARNING: Removing default PaaSDiagnostics configuration for all roles from Cloud Service sn.
VERBOSE: 09:05:31 - Begin Operation: Remove-AzureServiceDiagnosticsExtension
Remove-AzureServiceDiagnosticsExtension : InternalError : The server encountered an internal error. Please retry the request.
At line:1 char:1
+ Remove-AzureServiceDiagnosticsExtension  sn -UninstallConfiguration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Remove-AzureServiceDiagnosticsExtension], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.RemoveAzureServiceDiagnosticsExtensionCommand

VERBOSE: 09:06:03 - Completed Operation: Remove-AzureServiceDiagnosticsExtension

January 8th, 2015 12:12pm

When trying to set the Diagnostics extension manually via Azure PowerShell, it works when following the advice at the bottom of this article:

http://blogs.msdn.com/b/kwill/archive/2014/12/02/windows-azure-diagnostics-upgrading-from-azure-sdk-2-4-to-azure-sdk-2-5.aspx

E.g.

PS C:\> Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath 'C:\Projects\
new_diagnostics.wadcfgx' -ServiceName $service_name -Slot Production
AUSFHRLICH: Setting default PaaSDiagnostics configuration for all roles.
AUSFHRLICH: 16:36:50 - Begin Operation: Set-AzureServiceDiagnosticsExtension
AUSFHRLICH: 16:38:54 - Completed Operation: Set-AzureServiceDiagnosticsExtension

OperationDescription                    OperationId                             OperationStatus
--------------------                    -----------                             ---------------
Set-AzureServiceDiagnosticsExtension    <id>    Succeeded

Note that you have to remove the surrounding <DiagnosticsConfiguration> tag in the new_diagnostics.wadcfgx. If you don't remove it you'll get an XML schema validation error (see below).

I haven't yet managed to get it running with VS publish.

----

PS C:\> Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath 'C:\Projects\
new_diagnostics.wadcfgx' -ServiceName $service_name -Slot Production
AUSFHRLICH: Setting default PaaSDiagnostics configuration for all roles.
Set-AzureServiceDiagnosticsExtension : BadRequest: The extension public configuration <DiagnosticsConfiguration
xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
  <PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <WadCfg>
      <DiagnosticMonitorConfiguration overallQuotaInMB="4096">
        <DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Error" />
        <Directories scheduledTransferPeriod="PT1M">
          <IISLogs containerName="wad-iis-logfiles" />
          <FailedRequestLogs containerName="wad-failedrequestlogs" />
        </Directories>
        <PerformanceCounters scheduledTransferPeriod="PT1M">
          <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\ISAPI Extension Requests/sec"
sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Web Service(_Total)\Bytes Total/Sec" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Requests/Sec"
sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET Applications(__Total__)\Errors Total/Sec"
sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Queued" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\ASP.NET\Requests Rejected" sampleRate="PT3M" />
          <PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time" sampleRate="PT3M" />
        </PerformanceCounters>
        <WindowsEventLog scheduledTransferPeriod="PT1M">
          <DataSource name="Application!*" />
        </WindowsEventLog>
        <CrashDumps>
          <CrashDumpConfiguration processName="WaIISHost.exe" />
          <CrashDumpConfiguration processName="WaWorkerHost.exe" />
          <CrashDumpConfiguration processName="w3wp.exe" />
        </CrashDumps>
        <Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Error" />
      </DiagnosticMonitorConfiguration>
    </WadCfg>
<StorageAccount><...></StorageAccount>
  </PublicConfig>
</DiagnosticsConfiguration> is invalid against schema <?xml version="1.0" encoding="utf-8"?>
<xs:schema id="DiagnosticsConfigSchema"
    targetNamespace="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"
    elementFormDefault="qualified"
    xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"
    xmlns:wad="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"
    xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">

<... rest truncated ...>

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 6:57pm

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

Other recent topics Other recent topics