2014-02-17 162 views
1

我在Windows Azure上创建了新的存储帐户并设置了HDInsight群集。然而,当我尝试运行有关群集上的Windows Azure PowerShell的任何命令,我收到以下错误:使用JWT令牌的安全令牌验证错误 - HDInsight

PS C:\> Get-AzureHDInsightCluster -Name $clusterName 
Get-AzureHDInsightCluster : Request failed with code:Unauthorized 
Content:<Error xmlns="http://schemas.microsoft.com/windowsazure" 
xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>AuthenticationFailed</Code><Message>A security token 
validation error occured for the received JWT token.</Message></Error> 
At line:1 char:1 
+ Get-AzureHDInsightCluster -Name $clusterName 
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    + CategoryInfo   : NotSpecified: (:) [Get-AzureHDInsightCluster], HttpLayerException 
    + FullyQualifiedErrorId : Microsoft.Hadoop.Client.HttpLayerException,Microsoft.WindowsAzure.Management.HDInsight.C 
    mdlet.PSCmdlets.GetAzureHDInsightClusterCmdlet 

我完全新的HDInsight,但我跑了剧本,此命令添加Azure帐户,请从this页面为订阅名称,存储帐户名称和容器名称创建变量。

你知道这个错误是什么意思吗?以及如何解决它?我试图在遵循this网站后使用Pig命令运行脚本。

回答

1

它看起来像PowerShell环境没有正确设置。您应该先使用GetAzureSubscription添加您的Azure订阅。见:http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/#Connect

+0

谢谢你的提示,西蒙。我使用了“Add-AzureAccount”,它似乎连接到我的订阅,并且我能够使用“Get-AzureSubscription”验证名称。任何想法我可能会错过什么? – m00nbeam360

+0

我可能会误解,但如果此答案无助于您解决问题 - 尽管提示可能确实有用,但不应将其标记为最终解决方案,因为它可能会大大降低从其他人获得更多答案的机会贡献者。相反,upvote可能是更好的选择。 –