Powershell 使用AzureHDInsightCluster抛出错误
我正在尝试使用use-AzureHDInsightCluster powershell cmdletPowershell 使用AzureHDInsightCluster抛出错误,powershell,azure,azure-hdinsight,Powershell,Azure,Azure Hdinsight,我正在尝试使用use-AzureHDInsightCluster powershell cmdlet Use-AzureHDInsightCluster "mycluster" -Subscription (Get-AzureSubscription -Current).SubscriptionId 但是我得到了以下错误。我不知道从哪里开始,因为我是新手 Use-AzureHDInsightCluster : An error occurred while sending the reques
Use-AzureHDInsightCluster "mycluster" -Subscription (Get-AzureSubscription -Current).SubscriptionId
但是我得到了以下错误。我不知道从哪里开始,因为我是新手
Use-AzureHDInsightCluster : An error occurred while sending the request.
At line:1 char:1
+ Use-AzureHDInsightCluster "mycluster" -Subscription (Get-AzureSubscription -Cu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Use-AzureHDInsightCluster], HttpRequestException
+ FullyQualifiedErrorId : System.Net.Http.HttpRequestException,Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.
PSCmdlets.UseAzureHDInsightClusterCmdlet
编辑我添加了调试标志,得到了更多的信息
DEBUG: Severity: Error
One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.PSCmdlets.UseAzureHDInsightClusterCmdlet.EndProcessing()
An error occurred while sending the request.
at System.Threading.Tasks.TaskAwaiter`1.GetResult()
at
Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations.UseAzureHDInsightClusterCommand.<End
Processing>d__0.MoveNext()
Unable to connect to the remote server
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
An attempt was made to access a socket in a way forbidden by its access permissions 70.37.71.239:8443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket,
IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
调试:严重性:错误
发生了一个或多个错误。
位于System.Threading.Tasks.Task.ThrowifeException(布尔值IncludeTaskCanceledException)
在System.Threading.Tasks.Task.Wait(Int32毫秒计时,CancellationToken CancellationToken)
在Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.pscmdlet.UseAzureHDInsightClusterCmdlet.EndProcessing()上
发送请求时出错。
在System.Threading.Tasks.TaskWaiter`1.GetResult()中
在
Microsoft.WindowsAzure.Management.HDInsight.Cmdlet.Commands.CommandImplementations.UseAzureHDInsightClusterCommand.d_u0.MoveNext()
无法连接到远程服务器
位于System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
在System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)上
试图以其访问权限所禁止的方式访问套接字70.37.71.239:8443
位于System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
在System.Net.ServicePoint.ConnectSocketInternal(布尔连接失败、插座s4、插座s6、插座和插座、,
IP地址和地址、ConnectSocketState状态、IAsyncResult异步结果、异常和异常)
错误消息没有多大帮助,不是吗。PowerShell有一些常见的交换机。其中两个有助于调试。它们是-调试和-详细的。使用two开关重试该命令,并获取详细信息 “mycluster”是有效的群集名称吗?这是你在这篇文章中使用的名字吗?能否使用以下命令测试Windows Azure连接: 获得AzureSubscription 获取AzureHDInsightCluster
如果您没有收到订阅或群集列表。您可能需要先修复连接。有关连接到Azure帐户的信息,请参阅。错误消息不是很有帮助,不是吗。PowerShell有一些常见的交换机。其中两个有助于调试。它们是-调试和-详细的。使用two开关重试该命令,并获取详细信息 “mycluster”是有效的群集名称吗?这是你在这篇文章中使用的名字吗?能否使用以下命令测试Windows Azure连接: 获得AzureSubscription 获取AzureHDInsightCluster
如果您没有收到订阅或群集列表。您可能需要先修复连接。有关连接到Azure帐户的信息,请参阅。从下面的文件夹中删除WindowsAzureProfile.xml,然后重试:
C:\Users\xxxx\AppData\Roaming\Windows Azure Powershell从以下文件夹中删除WindowsAzureProfile.xml,然后重试: C:\Users\xxxx\AppData\Roaming\Windows Azure Powershell