【发布时间】:2016-07-06 17:03:01
【问题描述】:
我正在尝试使用以下命令更新 Azure 云服务的诊断配置...
$storage = New-AzureStorageContext -StorageAccountName {storageName} -StorageAccountKey {storage key}
Set-AzureServiceDiagnosticsExtension -ServiceName MyCloudServiceName -StorageContext $storage -Role {my role name} -Slot Production -DiagnosticsConfigurationPath MyWorkerRoleContent\diagnosticsUAT.wadcfgx
失败并出现以下错误...
Set-AzureServiceDiagnosticsExtension:在中找不到部署 服务:MyCloudServiceName 和插槽:生产。在行:1 字符:1 + 设置 AzureServiceDiagnosticsExtension -ServiceName MyCloudServiceName ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo:未指定:(:) [Set-AzureServiceDiagnosticsExtension],异常 + FullyQualifiedErrorId : System.Exception,Microsoft.WindowsAzure.Commands.ServiceManagement.Extensions.SetAzureSe rviceDiagnosticsExtensionCommand
我实际上已经使用完全相同的命令取得了成功,但使用了另一个 azure 订阅(以及明显不同的云服务名称和密钥)。我尝试创建一个暂存槽并在暂存槽上使用该命令。我也试过完全省略这个插槽,结果都是一样的。
有没有人遇到过这个问题并且对如何纠正它有任何见解?
【问题讨论】:
标签: azure azure-worker-roles azure-cloud-services azure-diagnostics azure-application-insights