question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az cosmosdb check-name-exists too many 500 error responses

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
vaughanh1commented, Jun 3, 2020

FYI: Using different versions of the Azure CLI makes no difference. Exactly the same error is provided every time, always after 7m30 elapsed.

2reactions
YKJumpercommented, Jun 3, 2020

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” {

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Azure Cosmos DB request rate too large ...
A "Request rate too large" exception, also known as error code 429, indicates that your requests against Azure Cosmos DB are being rate ......
Read more >
Getting too many 500 error exporting database : r/AZURE
I used the follow scrip: az sql db export -s sqlserver -n database -g ... Try to export SQL database error with too...
Read more >
Azure Cosmos DB 5xx Status Codes - Blue Matador
HTTP 500 (Internal Server Error). An Internal Server Error means an unexpected error occured with the Cosmos DB service. These errors may be...
Read more >
Adding vnet rule through AZ cli fails with 500 errors
And get the error above. I also tried specifying the vnet including the number postfix (e.g. aks-vnet-1234567) but same error. This probably ...
Read more >
What is a 500 Internal Server Error? - Allconnect.com
It's “full” and can't handle more data (for example, too many people are trying to access the site at one time); There's a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found