本文介绍了调用set-AzureServiceDiagnosticsExtension与Role参数失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Azure的PowerShell命令和SET-AzureServiceDiagnosticsExtension命令部署云服务设置Azure诊断:

I'm trying to set Azure diagnostics on a deployed cloud service using the Azure Powershell cmdlets and the Set-AzureServiceDiagnosticsExtension command:

Set-AzureServiceDiagnosticsExtension -StorageContext $storageContext -DiagnosticsConfigurationPath $diagnosticsConfiguration.FullName -ServiceName $serviceName -Slot Production -Role "MyService.Web"-Verbose

这样做,我得到以下错误

Doing so I get the following error

Exception: Microsoft.WindowsAzure.CloudException: BadRequest: The extension ID
MyService.Web-PaaSDiagnostics-Production-Ext-0 is invalid.
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task)
   at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task
task)
   at Microsoft.WindowsAzure.HostedServiceOperationsExtensions.AddExtension(IHo
stedServiceOperations operations, String serviceName,
HostedServiceAddExtensionParameters parameters)
   at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionMan
ager.AddExtension(HostedServiceAddExtensionParameters extensionInput)
   at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.ExtensionMan
ager.InstallExtension(ExtensionConfigurationInput context, String slot,
ExtensionConfiguration extConfig)
   at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServ
iceDiagnosticsExtensionCommand.ExecuteCommand()
   at Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureServ
iceDiagnosticsExtensionCommand.OnProcessRecord()
   at Microsoft.WindowsAzure.Commands.Utilities.Common.CloudBaseCmdlet`1.Proces
sRecord()
   at System.Management.Automation.Cmdlet.DoProcessRecord()
   at System.Management.Automation.CommandProcessor.ProcessRecord()
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorExcep
   tion
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
   n,UpdateDiagnosticsBuildStep.ps1

它工作的时候,我不调用设置命令它增加了每作用2-3分钟脚本执行时间之前使用-Role参数,但后来我打电话给删除,AzureServiceDiagnosticsExtension为每个角色。

It works when I don't use the "-Role" parameter but then I have to call Remove-AzureServiceDiagnosticsExtension for each role prior to calling the Set command which adds 2-3 minutes per role to the script execution time.

中的作用参数Azure云服务符合我的角色名。难道我做错了什么?

The Role parameter matches my role name in the Azure Cloud Service. Am I doing something wrong?

推荐答案

此不喜欢。在角色名称

更改强调,也将努力

它在PowerShell中的一个错误,他们会解决下次

Its a bug in powershell that they will fix next time

这篇关于调用set-AzureServiceDiagnosticsExtension与Role参数失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 14:15