我正在浏览http://azure.microsoft.com/en-us/documentation/articles/hdinsight-use-hive/但得到
Start-AzureHDInsightJob : Request failed after (12) attempts over a period of (00:03:10.4800236) with code: Forbidden
Content:<Error xmlns="http://schemas.microsoft.com/windowsazure"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>ForbiddenError</Code><Message>The server failed to authenticate
the request. Verify that the certificate is valid and is associated with this subscription.</Message></Error>
At D:\sandbox\hadoop\hive\ProcessExampleSampleLog.ps1:15 char:12
+ $hiveJob = Start-AzureHDInsightJob -Cluster $clusterName -JobDefinition $hiveJob ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-AzureHDInsightJob], HttpLayerException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.Library.WebRequest.HttpLayerExce
ption,Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets.StartAzureHDInsightJobCmdlet
我检查了给我的证书Get-AzureSubscription -Current
:
SubscriptionName : Dev
SubscriptionId : <CORRECT SUBSCRIPTION ID>
<SNIP>
IsDefault : False
Certificate : [Subject]
CN=Kevin
[Issuer]
CN=Kevin
[Serial Number]
<REDACTED>
[Not Before]
13/05/2013 14:27:18
[Not After]
19/04/2113 14:27:18
[Thumbprint]
<THUMBPRINT THAT MATCHES IN AZURE PORTAL WITH DEV SUBSCRIPTION>
CurrentStorageAccountName : <DIFFERENT STORAGE NAME TO THE HDINSIGHT ONE>
ActiveDirectoryUserId : <MY EMAIL>
TokenProvider : Microsoft.WindowsAzure.Commands.Utilities.Common.Authentication.AdalTokenProvider
唯一不匹配的是CurrentStorageAccountName
上面不是我用于 HDInsight 的,而是在查询中设置的。
Add-AzureAccount
在这一切之前我也成功执行了。
我们最近更改了订阅的名称(但在我创建 HDInsight 群集及其存储帐户之前),这可能是造成这种情况的原因。
我确实通过 azure 门户删除了我的证书并重新上传了它。
我现在有点卡住了。