Reputation: 51
Running into a strange issue with HDInsight connecting to my clusters. The code I am using to connect:
$clustername=<"clustername">
Use-AzureHDInsightCluster -Name $clusterName
Yesterday I would input this code through Powershell and it would not return any error message or any output. It would just continuously run. I thought this was a problem with my system so I created a virtual machine today (Running Windows 8) and input the code again. It worked about ten times then began to repeat the same problem that occurred yesterday. But today after running for ten minutes I received this error message:
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
I am still connected to my azure account and both of the commands below return the appropriate accounts that I am using:
Get-AzureAccount
Get-AzureSubscription
I restarted my virtual machine (which also gave me a new IP address) and I still received the same error message. All the other commands work well (ie. 'Get-AzureStorageBlob'), but any related to HDInsight fail (such as Get-AzureHdinsightcluster). Clearly something is the issue with HDInsight, however, I am confused because the commands had worked before. Between the times that I ran
Use-AzureHDInsightCluster successfully
and the time when it failed I ran the following code multiple times:
Invoke-Hive -File "wasb://<container>@<storage account>/blob"
Which also gave me this error:
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
During this time I tried to supply my credentials multiple different ways both through the Invoke-Hive command and through the Use-AzureHDInsightCluster command. I am less worried about this error, but I included it in case it has relevance to the HDInsight issue.
Any help would be appreciated since I've exhausted all my current ideas.
Upvotes: 1
Views: 688
Reputation: 51
Getting my certificate set up on Powershell fixed this error. Refer to this website for steps required to access your certificate: http://blogs.msdn.com/b/bigdatasupport/archive/2013/11/21/getting-started-with-hdinsight-powershell-tools-and-sdk.aspx
From the documentation I read on Azure it had seemed like getting a certificate setup was not required if the subscription had already been set up and accessed. This was true for all the services I had used except HDInsight. To use HDInsight with Powershell, however, I believe a certificate is required.
Upvotes: 1