azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

New-AzureRmRecoveryServicesVault - 'Please provide a different resource name or try again after 24 hours'

Open lukeb1961 opened this issue 8 years ago • 12 comments

Description

If I say Get-AzureRmRecoveryServicesVault it says there is NO vault. OK, so I then create it and it FAILS. 'Please provide a different resource name or try again after 24 hours'

No dammit. It either exists or it doesn't! Why the heck should I wait 24 hours to recreate a vault I deleted 15 minutes ago? If there is a reason, then the GET should not be returning empty. If there is a reason, the New should be giving me a sensible explanation. (you need -Debug to get the text!).

$PSVersionTable

Name Value


PSVersion 5.1.17763.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

get-module -name az

ModuleType Version Name ExportedCommands


Manifest 0.3.0 az

New-AzureRmRecoveryServicesVault -Name $BackUpVaultMelbourne -ResourceGroupName $RGASR -Location $Melbourne -Debug DEBUG: 15:37:19 - NewAzureRmRecoveryServicesVault begin processing with ParameterSet '__AllParameterSets'. DEBUG: 15:37:21 - using account id '[email protected]'... DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '1f89577f-4235 -4965-83e5-aad1a7e761fc' DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com/1f89577f-4235-4965-83e5-aad1a7e761fc/ Resource: https://management.core.windows.net/ ClientId: 1950a258-227b-4e31-a9cf-717495945fc2 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (9 items) Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: - TokenCache: Deserialized 9 items to token cache.

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - TokenCache: Looking up cache for a token...

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - TokenCache: An item matching the requested resource was found in the ca che

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - TokenCache: 40.0607112366667 minutes left until token in cache expires

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - TokenCache: A matching item (access token or refresh token or both) was found in the cache

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 6ce2f4fe-d860-4f1a-888b-1abb7ef4dc2e - AcquireTokenHandlerBase: === Token Acquisition finished successfully. A n access token was retuned: Access Token Hash: 2DCvs/tAOeHymcZpL/vxFOugVkG9bSkIyFpqioPNzJg= Refresh Token Hash: +a+HaXBnzmPXSocI7fQBvKV9bzqJXnxH7xZTEXehVbM= Expiration Time: 10/14/2018 08:17:26 +00:00 User Hash: YaMfsGPkmwxwhyKw73ipmyjRqqUKsNAj5t9JRnaYlxk=

DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '1f89577f-4235 -4965-83e5-aad1a7e761fc' DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com/1f89577f-4235-4965-83e5-aad1a7e761fc/ Resource: https://management.core.windows.net/ ClientId: 1950a258-227b-4e31-a9cf-717495945fc2 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (9 items) Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: - TokenCache: Deserialized 9 items to token cache.

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - TokenCache: Looking up cache for a token...

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - TokenCache: An item matching the requested resource was found in the ca che

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - TokenCache: 40.0606444783333 minutes left until token in cache expires

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - TokenCache: A matching item (access token or refresh token or both) was found in the cache

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: 8bc48d5f-edc1-4014-a354-5875eacdd7a4 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. A n access token was retuned: Access Token Hash: 2DCvs/tAOeHymcZpL/vxFOugVkG9bSkIyFpqioPNzJg= Refresh Token Hash: +a+HaXBnzmPXSocI7fQBvKV9bzqJXnxH7xZTEXehVbM= Expiration Time: 10/14/2018 08:17:26 +00:00 User Hash: YaMfsGPkmwxwhyKw73ipmyjRqqUKsNAj5t9JRnaYlxk=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com/1f89577f-4235-4965-83e5-aad1a7e761fc/ Resource: https://management.core.windows.net/ ClientId: 1950a258-227b-4e31-a9cf-717495945fc2 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (9 items) Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: - TokenCache: Deserialized 9 items to token cache.

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - TokenCache: Looking up cache for a token...

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - TokenCache: An item matching the requested resource was found in the ca che

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - TokenCache: 40.060494535 minutes left until token in cache expires

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - TokenCache: A matching item (access token or refresh token or both) was found in the cache

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 10/14/2018 07:37:22: f3114a10-4f24-4e18-a011-85c38e8a40d0 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. A n access token was retuned: Access Token Hash: 2DCvs/tAOeHymcZpL/vxFOugVkG9bSkIyFpqioPNzJg= Refresh Token Hash: +a+HaXBnzmPXSocI7fQBvKV9bzqJXnxH7xZTEXehVbM= Expiration Time: 10/14/2018 08:17:26 +00:00 User Hash: YaMfsGPkmwxwhyKw73ipmyjRqqUKsNAj5t9JRnaYlxk=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: PUT

Absolute Uri: https://management.azure.com/subscriptions/b8e3a02e-456c-4060-a4fd-4fc9641f301d/resourceGroups/lukebrennan-ASRMel/providers/Microsoft.Reco veryServices/vaults/lukebrennan-melASRvault?api-version=2016-06-01

Headers: x-ms-client-request-id : cd30fa36-0dcd-4121-ae50-b405e9873fc0-2018-10-14 07:37:22Z-P accept-language : en-US

Body: { "properties": {}, "sku": { "name": "Standard" }, "location": "australiasoutheast" }

DEBUG: ============================ HTTP RESPONSE ============================

Status Code: BadRequest

Headers: Pragma : no-cache X-Content-Type-Options : nosniff x-ms-request-id : d13b1324-2ace-4263-9eb7-9d2ceec0b27e x-ms-client-request-id : 10210b95-7bec-4e77-98da-0e1806d57b42 Strict-Transport-Security : max-age=31536000; includeSubDomains x-ms-ratelimit-remaining-subscription-writes: 1194 x-ms-correlation-request-id : d13b1324-2ace-4263-9eb7-9d2ceec0b27e x-ms-routing-request-id : SOUTHEASTASIA:20181014T073725Z:d13b1324-2ace-4263-9eb7-9d2ceec0b27e Cache-Control : no-cache Date : Sun, 14 Oct 2018 07:37:24 GMT Server : Microsoft-IIS/10.0

Body: { "error": { "code": "BadRequest", "message": "{"ErrorCode":"CreateResourceFailedDueToInvalidCache","Message":{"Language":"en-US","Value":"Create Resource F ailed as name is already in use\r\nPlease provide a different resource name or try again after 24 hours"},"Values":[]}" } }

New-AzureRmRecoveryServicesVault : Operation failed. ClientRequestId: cd30fa36-0dcd-4121-ae50-b405e9873fc0-2018-10-14 07:37:22Z-P One or more errors occurred. At line:1 char:1

  • New-AzureRmRecoveryServicesVault -Name $BackUpVaultMelbourne `
  •   + CategoryInfo          : CloseError: (:) [New-AzureRmRecoveryServicesVault], Exception
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.RecoveryServices.NewAzureRmRecoveryServicesVault
    
    

DEBUG: AzureQoSEvent: CommandName - New-AzureRmRecoveryServicesVault; IsSuccess - False; Duration - 00:00:07.2467053; Exception - System.E xception: Operation failed. ClientRequestId: cd30fa36-0dcd-4121-ae50-b405e9873fc0-2018-10-14 07:37:22Z-P One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> Microsoft.Rest.Azure.CloudException: {"Erro rCode":"CreateResourceFailedDueToInvalidCache","Message":{"Language":"en-US","Value":"Create Resource Failed as name is already in use\r\n Please provide a different resource name or try again after 24 hours"},"Values":[]} at Microsoft.Azure.Management.RecoveryServices.VaultsOperations.d__8.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.Azure.Commands.RecoveryServices.PSRecoveryServicesClient.CreateVault(String resouceGroupName, String vaultName, Vault vaul t) at Microsoft.Azure.Commands.RecoveryServices.NewAzureRmRecoveryServicesVault.ExecuteCmdlet() --- End of inner exception stack trace --- at Microsoft.Azure.Commands.RecoveryServices.RecoveryServicesCmdletBase.HandleException(Exception ex) at Microsoft.Azure.Commands.RecoveryServices.NewAzureRmRecoveryServicesVault.ExecuteCmdlet() at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord(); DEBUG: Finish sending metric. DEBUG: 15:37:26 - NewAzureRmRecoveryServicesVault end processing. DEBUG: 15:37:26 - NewAzureRmRecoveryServicesVault end processing.

lukeb1961 avatar Oct 14 '18 07:10 lukeb1961

@dragonfly91 Can you please take a look and get back to the customer with a response? From the log, this looks like a service-side issue with a service-side cache. If this is expected, can you please supply a detailed reason why (e.g. domain name reservation associate with vault)

markcowl avatar Oct 15 '18 17:10 markcowl

I'm currently facing the same issue, can you provide a response ?

Eagdra avatar Oct 29 '18 19:10 Eagdra

There is no response on this yet? I am facing the same issue. Please, prioritize.

RaphaelFrancisco avatar May 24 '19 10:05 RaphaelFrancisco

I am seeing this as well with terraform which calls the API azurerm_recovery_services_vault.rsv: Error creating/updating Recovery Service Vault "EUS-123456-RSV01" (Resource Group "EUS-123456-PROD"): recoveryservices.VaultsClient#CreateOrUpdate: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status= Code="Conflict" Message="{"ErrorCode":"CreateResourceFailedDueToInvalidCache","Message":{"Language":"en-US","Value":"Create Resource Failed as name is already in use\r\nPlease provide a different resource name or choose a different resource group or retry again after 24 hours"},"Values":[]}"

jrudley avatar Jul 26 '19 14:07 jrudley

People waiting on things so simple for almost a year. And then somebody would wonder why customers migrate to AWS or GCP.

diegopietruszka avatar Aug 07 '19 14:08 diegopietruszka

still waiting....

Rubiooo avatar Aug 27 '19 14:08 Rubiooo

same problem here.

danwellbrock avatar Sep 04 '19 13:09 danwellbrock

+1 same issue today :

Terraform 0.12.12 + azurerm provider 1.36.1

recoveryservices.VaultsClient#CreateOrUpdate: Failure sending request: StatusCode=409 -- Original Error: autorest/azure: Service returned an error. Status= Code="Conflict" Message="{"ErrorCode":"CreateResourceFailedDueToInvalidCache","Message":{"Language":"en-US","Value":"Create Resource Failed as name is already in use\r\nPlease provide a different resource name or choose a different resource group or retry again after 24 hours"},"Values":[]}"

if i try using the console to recreate the resource group, same thing and it says : A resource group with the same name already exists in the selected subscription *************

Kumoservices avatar Nov 15 '19 15:11 Kumoservices

+1

Ikaro0 avatar Dec 18 '19 15:12 Ikaro0

Me too. Happened when I've deployed template and then deleted and redeployed it. Maybe we'll get some response in another year?

XXXdimaka avatar Dec 26 '19 11:12 XXXdimaka

Same issue here

ghostme avatar Jan 15 '20 22:01 ghostme

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Sharmistha-Rai.

ghost avatar Oct 08 '20 20:10 ghost