powershell - JWT token 的安全 token 验证错误 -- HDInsight

标签 powershell azure hadoop apache-pig azure-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 命令运行脚本网站。

最佳答案

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

关于powershell - JWT token 的安全 token 验证错误 -- HDInsight,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21840489/

相关文章:

如果匹配,powershell 比较 2 个数组输出

azure - 如何配置我的 Azure VM 终结点 ACL 以允许从同一门户上的 Azure Web 作业进行连接

python - 在 R 中运行 azuremlsdk::install_azureml() 时出错

hadoop - 如何在 Hadoop 环境中查找集群名称?

java - JobTracker未运行

powershell - 在 PowerShell 7 中 try catch 后访问变量时出错

powershell - 如何在 Powershell 管道中引用前一个 "pipe"的输出?

regex - Powershell正则表达式中的变量

azure - 在 Azure 应用服务中,我们是否需要清理 LogFiles 目录中的文件,或者 Azure 是否有相应的清理流程?

hadoop - 一组中的所有记录都调用一次 'reduce' 吗?