4

我試圖使用Azure的PowerShell命令和SET-AzureServiceDiagnosticsExtension命令部署雲服務設置Azure診斷:調用set-AzureServiceDiagnosticsExtension與角色參數失敗

​​

這樣做,我得到以下錯誤

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 

它工作的時候,我不叫set命令它增加了2-3分鐘,每個角色的腳本之前使用「-Role」參數,但後來我打電話給刪除,AzureServiceDiagnosticsExtension爲每個角色執行時間處理時間。

Role參數與我在Azure Cloud Service中的角色名稱匹配。難道我做錯了什麼?

+0

用導致的任何運氣?我有同樣的問題。礦山適用於工作者角色,但不適用於Web角色。 –

+4

不是,這是微軟公認的錯誤。你可以看看我的問題以及他們在這裏建議的解決方法: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 – Evan

+0

您的自定義日誌傳輸了嗎?我仍然無法讓我的nlog日誌按計劃轉移。事件日誌中沒有錯誤。這很痛苦。 –

回答

2

這不喜歡。在角色名稱

變化強調,它會工作

它在PowerShell中的錯誤,他們會解決下一次

+0

您可以通過在服務級別應用診斷(只是省略-Role參數)來解決此問題,如果您嘗試將其應用於特定角色並使用「。以失敗的名義。 –