Get-AzureRmHDInsightOperationsManagementSuite throwing an error
Cmdlet(s)
Get-AzureRmHDInsightOperationsManagementSuite
PowerShell Version
5.1.16299.64
Module Version
5.1.1
OS Version
10.0.16299.64
Description
The cmdlet Get-AzureRmHDInsightOperationsManagementSuite or Get-AzureRmHDInsightOMS throws an error saying "Get-AzureRmHDInsightOMS : Can not convert Object to String."
Debug Output
DEBUG: 5:37:34 PM - GetAzureHDInsightOMSCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 5:37:34 PM - using account id ''...
DEBUG: [Common.Authentication]: Authenticating using Account: '', environment: 'AzureCloud', tenant: ''
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: - TokenCache: Serializing token cache with 1 items.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: - TokenCache: Serializing token cache with 1 items.
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '', Endpoint: 'https://login.micro
softonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.c
ore.windows.net/', ValidateAuthrity: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com/[]/', C
orrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '', AdEndpoint: 'https://login.m
icrosoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: urn:ietf:wg:oauth:2.0:oob
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/[]/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (1 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - TokenCache: 56.4458936066667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - TokenCache: A matching item (access token or refresh token or both) was found in the c
ache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: c1031d68-7328-476b-945f-e19a38adc00c - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token
was retuned:
Access Token Hash: xWyE+rB6cdcNmsih8ZmfQk52hkOqi//9AkhRGvJf6mk=
Refresh Token Hash: tL0M9bYpVY88CGIGjoU2ycft5M0PdKlis3i+Cz7J0C0=
Expiration Time: 12/14/2017 13:04:00 +00:00
User Hash: Mk9l/pRzYF4eQmXWbqXQaY/LIcv6KvisB6i/dFJg36U=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 12/14/2017 12:07:34: - TokenCache: Serializing token cache with 1 items.
DEBUG: [Common.Authentication]: Received token with LoginType 'LiveId', Tenant: '', UserId: ''
DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '12/14/2017 13:04:00 +00:00', MultipleResource? 'True', Tenant: '', UserId: ''
DEBUG: [Common.Authentication]: User info for token DisplayId: '', Name: Vinay Damisetty, IdProvider: 'https://sts.w
indows.net/[]/', Uid: '2a4b3d72-419c-43b2-9560-8ec7aad95a1b'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '12/14/2017 13:04:00 +00:00' Comparing to '12/14/2017 12:07:34 +00:00' With thre
shold '00:05:00', calculated time until token expiry: '00:56:26.7526131'
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/[]/resourceGroups/[]/providers/Microsoft.HDInsight//clusters/sarhd6/extensions/clustermonitoring?api-version=2015-03-01-preview
Headers:
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-hdi-matched-rule : ClusterResourcesAndSubResources
x-ms-hdi-routed-to : RegionalRp
x-ms-request-id : beb497d0-7ac3-468e-8a41-c5fa569dc23f
x-ms-hdi-served-by : northeurope
Strict-Transport-Security : max-age=31536000; includeSubDomains
x-ms-ratelimit-remaining-subscription-reads: 14704
x-ms-correlation-request-id : f9cc2fa1-fa44-4635-9b37-3e320fd5cfb0
x-ms-routing-request-id : SOUTHINDIA:20171214T120734Z:f9cc2fa1-fa44-4635-9b37-3e320fd5cfb0
Cache-Control : no-cache
Date : Thu, 14 Dec 2017 12:07:34 GMT
Body:
{
"clusterMonitoringEnabled": false,
"workspaceId": null
}
Get-AzureRmHDInsightOMS : Can not convert Object to String.
At line:1 char:1
+ Get-AzureRmHDInsightOMS -Name sarhd6 -ResourceGroupName ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureRmHDIn...ManagementSuite], ArgumentException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.HDInsight.GetAzureHDInsightOMSCommand
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmHDInsightOperationsManagementSuite; IsSuccess - False; Duration - 00:00:00.5367373; Exception - System.Arg
umentException: Can not convert Object to String.
at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value)
at Microsoft.Azure.Management.HDInsight.ClusterOperations.<GetMonitoringStatusAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Management.HDInsight.ClusterOperationsExtensions.GetMonitoringStatus(IClusterOperations operations, String resourceGroupName, Strin
g clusterName)
at Microsoft.Azure.Commands.HDInsight.GetAzureHDInsightOMSCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord();
DEBUG: Finish sending metric.
DEBUG: 5:37:39 PM - GetAzureHDInsightOMSCommand end processing.
DEBUG: 5:37:39 PM - GetAzureHDInsightOMSCommand end processing.
Script/Steps for Reproduction
Create an HDInsight cluster. Invoke the cmdlet Get-AzureRmHDInsightOMS -Name [] -ResourceGroupName []
@twitchax Hey Aaron, we need to find the contact for the HDInsight cmdlets since both of the devs who were working on the cmdlets are no longer on the team
@momusoru @z01c @wawon-msft would you mind taking a look at this issue?
Sorry, I missed this one. :( My bad.
@twitchax @cormacpayne : This issue exists for over 6 month now. We need this Cmdlet working to write automation Scripts for HDI. When will a fix be available? Our customers need a timeline.
sprint160
Fixed by Az.HDInsight 3.0.0-preview