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.

Container client fails slowly instead of ResourceNotFound

See original GitHub issue
  • azure-storage-blob
  • 12.3.2
  • Ubuntu 20.04
  • 3.8.2

Describe the bug I’ve been advised in #12744 to open a new issue for this behaviour.

I’m trying to use

from azure.storage.blob import ContainerClient

client = ContainerClient("storage1234567", container_name="container-01")
client.get_container_properties()

to check if a container exists. I had expected either an immediate ResourceNotFound or otherwise some unauthorised message - basically anything that would allow me to fail fast. Instead the command runs for about 2 minutes, retrying twice (three times in total, I believe with some backoff) resulting in

azure.core.exceptions.ServiceRequestError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f7bd6ef8bb0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

I have also tried all the timeout kwargs I can think of, timeout, read_timeout, connection_timeout, socket_timeout (supplied as numeric or tuple) and none make a difference.

Is there a way to short-circuit this and allow me to catch some faster failure?

To Reproduce

from azure.storage.blob import ContainerClient

client = ContainerClient("storage1234567", container_name="container-01")
client.get_container_properties()

Expected behavior @tasherif-msft advises

Hi @AkhilGNair, interesting issue you’ve come across, but this is actually an unexpected behavior. The error you’re getting implies the request was not sent (you would receive a ResourceNotFound response from the server if the request was sent).

My expectation is that I can quickly catch a failure!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
AkhilGNaircommented, Sep 22, 2020

This is great (and makes me feel stupid 😉) - the validation would be perfect as it was just the URL validation I was missing.

Creds are fine, no issue there - just wanted to catch the unauthorised error.

Thank you!

1reaction
xiafu-msftcommented, Sep 14, 2020

Hi @AkhilGNair

The error says “Temporary failure in name resolution” can you try to change the container name to “container01”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Monitor and troubleshoot Azure Storage (classic logs & metrics)
This guide shows you how to use features such as Azure Storage Analytics, client-side logging in the Azure Storage Client Library, and other ......
Read more >
Cosmos DB throws "Resource Not Found" error after ...
I can reproduce the issue on my side, based on my test and study, I find that Azure SDK help us to check...
Read more >
Troubleshooting Vertex AI | Google Cloud
Resource not found error when sending a streaming ingestion or online serving request. After you set up a featurestore, entity type, or feature...
Read more >
How to access data from Azure Blob Storage using Power BI
I have uploaded a CSV (comma separated values) file named “Countryregion.csv” on the Blob Storage container. To know the process of uploading ...
Read more >
Enabling Azure CDN to read Azure Storage account blobs to ...
If your sure the file exists in your storage account container most ... Client IP access error when connecting to Azure SQL Database...
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