Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HDInsight通过Microsoft Powershell授权出错_Powershell_Azure_Azure Hdinsight - Fatal编程技术网

HDInsight通过Microsoft Powershell授权出错

HDInsight通过Microsoft Powershell授权出错,powershell,azure,azure-hdinsight,Powershell,Azure,Azure Hdinsight,HDInsight连接到我的群集时遇到了一个奇怪的问题。 我用于连接的代码: $clustername=<"clustername"> Use-AzureHDInsightCluster -Name $clusterName 我仍然连接到我的azure帐户,下面两个命令都返回我正在使用的相应帐户: Get-AzureAccount Get-AzureSubscription 我重新启动了我的虚拟机(它也给了我一个新的IP地址),但仍然收到了相同的错误消息。所有其他命令都工作正常

HDInsight连接到我的群集时遇到了一个奇怪的问题。 我用于连接的代码:

$clustername=<"clustername">
Use-AzureHDInsightCluster -Name $clusterName 
我仍然连接到我的azure帐户,下面两个命令都返回我正在使用的相应帐户:

Get-AzureAccount
Get-AzureSubscription
我重新启动了我的虚拟机(它也给了我一个新的IP地址),但仍然收到了相同的错误消息。所有其他命令都工作正常(即“Get-AzureStorageBlob”),但与HDInsight相关的任何命令都会失败(例如Get-AzureHdinsightcluster)。很明显,HDInsight存在一些问题,但是,我感到困惑,因为这些命令以前就可以使用了。在我跑步的时候

Use-AzureHDInsightCluster successfully 
失败时,我多次运行以下代码:

Invoke-Hive -File "wasb://<container>@<storage account>/blob"
调用配置单元-文件“wasb://@/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
调用配置单元:请求失败,代码为:InternalServerError
内容:{“错误”:“org.apache.hadoop.fs.azure.AzureException:无法访问帐户中的容器
正在使用匿名凭据,但在配置中找不到这些凭据。“}
第1行字符:1
+调用配置单元-文件“wasb://”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+CategoryInfo:NotSpecified:(:)[Invoke AzureHDInsightHiveJob],HttpLayerException
+FullyQualifiedErrorId:Microsoft.WindowsAzure.Management.HDInsight.Framework.Core.Library.WebRequest.HttpLayerException,Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.pscmdlet.InvokeHiveCmdlet
在此期间,我尝试通过Invoke-Hive命令和Use-AzureHDInsightCluster命令以多种不同的方式提供凭据。我不太担心这个错误,但我将其包括在内,以防它与HDInsight问题相关


由于我已经用尽了当前的所有想法,因此非常感谢您的帮助。

在Powershell上设置证书修复了此错误。有关访问您的证书所需的步骤,请参阅本网站:

从我在Azure上阅读的文档来看,如果订阅已经设置和访问,那么似乎不需要进行证书设置。除HDInsight外,我使用的所有服务都是如此。但是,要将HDInsight与Powershell一起使用,我认为需要证书

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