Get-AzureRmExpressRouteCircuitStats fails when peering type is specified
Cmdlet(s)
Get-AzureRmExpressRouteCircuitStats
PowerShell Version
Instructions: to get PowerShell version, type $PSVersionTable and look for the value associated with PSVersion
Name Value
PSVersion 5.1.15063.296
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.15063.296
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module Version
Script 4.0.0 AzureRM.Network Script 3.0.0 AzureRM.Profile
OS Version
Instructions: to get OS version, type $PSversionTable and look for value associated with BuildVersion
BuildVersion 10.0.15063.296
Description
Running the command Get-AzureRmExpressRouteCircuitStats -ResourceGroupName $EXRGName -ExpressRouteCircuitName $EXName works fine however when specifying the PeeringType parameter the command fails with an error 500, internal server Error
Debug Output
Instructions: to get Debug Output, set $DebugPreference="Continue" and then execute the cmdlet or script causing the issue
DEBUG: 16:12:43 - GetAzureExpressRouteCircuitStatsCommand begin processing with ParameterSet '__AllParameterSets'. DEBUG: 16:12:44 - using account id ''... DEBUG: [Common.Authentication]: Authenticating using Account: '', environment: 'AzureCloud', tenant: '**********' DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com// Resource: https://management.core.windows.net/ ClientId: ************ CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (1 items) Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: - TokenCache: Deserialized 1 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: 42.0668740433333 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An acce ss token was retuned: Access Token Hash: *************************************** Refresh Token Hash: *********************************************** Expiration Time: 05/22/2017 15:54:48 +00:00 User Hash: ******************************************
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: *************************** - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com/************/ Resource: https://management.core.windows.net/ ClientId: ************ CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (1 items) Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: - TokenCache: Deserialized 1 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: 42.0668240416667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 05/22/2017 15:12:44: ************ - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An acce ss token was retuned: Access Token Hash: **************************** Refresh Token Hash: **************************** Expiration Time: 05/22/2017 15:54:48 +00:00 User Hash: ****************************
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method: GET
Absolute Uri: https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Network/expre ssRouteCircuits/****************************/peerings/AzurePrivatePeering/stats?api-version=2017-03-01
Headers: x-ms-client-request-id : **************************** accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code: InternalServerError
Headers: Pragma : no-cache x-ms-request-id : **************************** Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0 x-ms-failure-cause : service x-ms-ratelimit-remaining-subscription-reads: 14585 x-ms-correlation-request-id : **************************** x-ms-routing-request-id : WESTEUROPE:20170522T151305Z:**************************** Date : Mon, 22 May 2017 15:13:05 GMT Connection : close
Body: { "error": { "code": "InternalServerError", "message": "An error occured.", "details": [] } }
Get-AzureRmExpressRouteCircuitStats : An error occured. StatusCode: 500 ReasonPhrase: Internal Server Error OperationID : '****************************' At line:1 char:1
- Get-AzureRmExpressRouteCircuitStats -ResourceGroupName $EXRGName -Exp ...
-
+ CategoryInfo : CloseError: (:) [Get-AzureRmExpressRouteCircuitStats], NetworkCloudException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Network.GetAzureExpressRouteCircuitStatsCommand
DEBUG: AzureQoSEvent: CommandName - Get-AzureRmExpressRouteCircuitStats; IsSuccess - False; Duration - 00:00:24.7799644; Exception - Microsoft.A
zure.Commands.Network.Common.NetworkCloudException: An error occured.
StatusCode: 500
ReasonPhrase: Internal Server Error
OperationID : '****************************' ---> Microsoft.Rest.Azure.CloudException: An error occured.
at Microsoft.Azure.Management.Network.ExpressRouteCircuitsOperations.
AzurePSCmdlet.cs:line 642;
DEBUG: Finish sending metric.
DEBUG: 16:13:08 - GetAzureExpressRouteCircuitStatsCommand end processing.
DEBUG: 16:13:08 - GetAzureExpressRouteCircuitStatsCommand end processing.
Script/Steps for Reproduction
Run the command Get-AzureRmExpressRouteCircuitStats -ResourceGroupName $EXRGName -ExpressRouteCircuitName $EXName -PeeringType AzurePrivatePeering
@nupurkot Can you take a look?
@dihan0604 @dedhar @vinayada1 Can you take a look at this issue?
I was not able to reproduce the issue. Please reopen the issue if you still see it.