2

I'm trying to use the Use-AzureHDInsightCluster powershell cmdlet

Use-AzureHDInsightCluster "mycluster" -Subscription (Get-AzureSubscription -Current).SubscriptionId

but I get the following error. Not sure where to start as I'm new to this.

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

EDIT I've added the debug flag and I get a little more information

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)
4

2 回答 2

0

从以下文件夹中删除 WindowsAzureProfile.xml 并重试:C:\Users\xxxx\AppData\Roaming\Windows Azure Powershell

于 2014-03-12T11:43:45.057 回答
-1

错误消息不是很有帮助,不是吗。PowerShell 有一些常用的开关。其中两个有助于调试。它们是-debug 和-verbose。使用两个开关重试命令并获取详细信息。

“mycluster”是一个有效的集群名称吗?这是您用于此帖子的名称吗?您能否使用以下命令测试 Windows Azure 连接:

获取 AzureSubscription 获取 AzureHDInsightCluster

如果您没有收到订阅或集群列表。您可能需要先修复连接。有关连接到 Azure 帐户的信息,请参阅http://www.windowsazure.com/en-us/manage/install-and-configure-windows-powershell/

于 2013-12-07T19:14:47.330 回答