HDInsight连接到我的群集遇到一个奇怪的问题。 我用来连接的代码:
$clustername=<"clustername">
Use-AzureHDInsightCluster -Name $clusterName
昨天我将通过Powershell输入此代码,它不会返回任何错误消息或任何输出。它会继续运行。我认为这是我系统的一个问题所以我今天创建了一个虚拟机(运行Windows 8)并再次输入代码。它工作了大约十次然后开始重复昨天发生的同样的问题。但是今天跑了十分钟后我收到了这条错误信息:
USe-AzureHDInsightCluster : Request failed after (41) attempts over a period of (00:10:57.3107100) 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
+ USe-AzureHDInsightCluster -Name $clusterName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Use-AzureHDInsightCluster], HttpLayerException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.Library.WebRequest.HttpLayerException,Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets.UseAzureHDInsightClusterCmdlet
我仍然连接到我的azure帐户,以下两个命令都会返回我正在使用的相应帐户:
Get-AzureAccount
Get-AzureSubscription
我重新启动了我的虚拟机(它也给了我一个新的IP地址),但仍然收到了相同的错误消息。所有其他命令都运行良好(即&#39; Get-AzureStorageBlob&#39;),但任何与HDInsight相关的命令都失败(例如Get-AzureHdinsightcluster)。显然HDInsight存在一些问题,但是我很困惑,因为之前的命令已经奏效了。在我跑的时间之间
Use-AzureHDInsightCluster successfully
以及失败的时间我多次运行以下代码:
Invoke-Hive -File "wasb://<container>@<storage account>/blob"
这也给了我这个错误:
Invoke-Hive : Request failed with code:InternalServerError
Content:{"error":"org.apache.hadoop.fs.azure.AzureException: Unable to access container <container> in account
<storage account> using anonymous credentials, and no credentials found for them in the configuration."}
At line:1 char:1
+ Invoke-Hive -File "wasb://<container>@<storage account>/<blob>"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-AzureHDInsightHiveJob], HttpLayerException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.Library.WebRequest.HttpLayerException,Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets.InvokeHiveCmdlet
在此期间,我尝试通过Invoke-Hive命令和Use-AzureHDInsightCluster命令以多种不同方式提供我的凭据。我不太担心这个错误,但我把它包括在内,以防它与HDInsight问题有关。
任何帮助都会受到赞赏,因为我已经用尽了所有现有的想法。
答案 0 :(得分:1)
在Powershell上设置我的证书修复了此错误。有关访问证书所需的步骤,请访问此网站:http://blogs.msdn.com/b/bigdatasupport/archive/2013/11/21/getting-started-with-hdinsight-powershell-tools-and-sdk.aspx
从我在Azure上阅读的文档看来,如果订阅已经设置和访问,则不需要获取证书设置。除了HDInsight之外,我使用过的所有服务都是如此。但是,要将HDInsight与Powershell一起使用,我认为需要证书。