使用JWT令牌的安全令牌验证错误 - HDInsight

时间:2014-02-17 22:23:52

标签: powershell azure hadoop apache-pig hdinsight

我创建了一个新的存储帐户,并在Windows Azure上配置了一个HDInsight群集。但是,当我尝试在与群集相关的Windows Azure Powershell上运行任何命令时,出现以下错误:

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 个答案:

答案 0 :(得分:1)

看起来PowerShell环境设置不正确。您应首先使用GetAzureSubscription添加Azure订阅。请参阅:http://www.windowsazure.com/en-us/documentation/articles/install-configure-powershell/#Connect