az cosmosdb check-name-exists too many 500 error responses
See original GitHub issueDescribe the bug
Command Name
az cosmosdb check-name-exists
Errors:
request failed: Error occurred in request., RetryError: HTTPSConnectionPool(host='management.azure.com', port=443): Max retries exceeded with url: /providers/Microsoft.DocumentDB/databaseAccountNames/dev-db-account-ms-esb?api-version=2020-03-01 (Caused by ResponseError('too many 500 error responses',))
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az login
az cosmosdb check-name-exists --name dev-db-account-ms-esb
Expected Behavior
true or false is returned without error
Environment Summary
Windows-10-10.0.18362-SP0
Python 3.6.6
Installer: MSI
azure-cli 2.7.0
Additional Context
This issue is happening in our GitLab-ci DevOps pipelines and in my local setup. I tried login with “az login” manually and with pregenerated service principal credentials.
I noticed it while I was trying to launch my Terraform plan, this error ocurred and then I tried to debug it:
2020/06/02 11:37:09 [ERROR] <root>: eval: *terraform.EvalSequence, err: Error checking if CosmosDB Account "ACCOUNTNAME" already exists (Resource Group "RESOURCEGROUPNAME"): documentdb.DatabaseAccountsClient#CheckNameExists: Failure responding to request: StatusCode=500 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF
Error: Error checking if CosmosDB Account "ACCOUNTNAME" already exists (Resource Group "RESOURCEGROUPNAME"): documentdb.DatabaseAccountsClient#CheckNameExists: Failure responding to request: StatusCode=500 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF
on main.tf line 40, in resource "azurerm_cosmosdb_account" "db":
40: resource "azurerm_cosmosdb_account" "db" {
In terraform, I am using version 2.12
provider “azurerm” { subscription_id = var.SUBSCRIPTION_ID tenant_id = var.SERVICEPRINCIPAL_TENANT_ID client_id = var.SERVICEPRINCIPAL_CLIENT_ID client_secret = var.SERVICEPRINCIPAL_CLIENT_SECRET
version = “= 2.12” features {} }
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:11 (2 by maintainers)
Top GitHub Comments
FYI: Using different versions of the Azure CLI makes no difference. Exactly the same error is provided every time, always after 7m30 elapsed.
I faced with the similar issue:
provider “azurerm” { version = “=2.12.0”
subscription_id = var.azurerm_subscription_id tenant_id = var.azurerm_tenant_id client_id = var.azurerm_client_id client_secret = var.azurerm_client_secret
features {} }
Terraform output: … … module.identity.module.identity_management.azurerm_cosmosdb_account.cosmosdb_account: Still creating… [7m20s elapsed] module.identity.module.identity_management.azurerm_cosmosdb_account.cosmosdb_account: Still creating… [7m30s elapsed]
Error: Error checking if CosmosDB Account “cosmos-interviews-yk01” already exists (Resource Group “rg-interviews-yk01”): documentdb.DatabaseAccountsClient#CheckNameExists: Failure responding to request: StatusCode=500 – Original Error: autorest/azure: error response cannot be parsed: “” error: EOF
on …..\service\interviews_service\main.tf line 342, in resource “azurerm_cosmosdb_account” “cosmosdb_account”: 342: resource “azurerm_cosmosdb_account” “cosmosdb_account” {