Closed v-takebi closed 2 years ago
Hey @v-takebi ,
Thanks for reaching out! AzCopy has retry with exponential back-off policy to retry a failed request 20 times. There can be n number of network errors while transferring data over internet and AzCopy cannot account for all of them. Afterall, an error may or may not be fatal. If not fatal, it may be transient and go away with retries. So, it is by design.
It is generally expected to have correct StorageAccountName in the source/destination URLs provided to AzCopy command.
Mohit Sharma-san,
Thanks for your quick and precise answer. Understand. This behavior is not about azcopy but networking, and should be by design. We'd like to use some conditional logic to validate before running into azcopy's process.
Many thanks as always! :)
Glad you found that useful!
You can use Azure CLI to get the properties of a storage Account. Please find this link
If you're invoking AzCopy from a program, I suggest you write a simple REST API call to get properties of a storage account. If it fails, it means that storage account wasn't valid.
Thanks for your alternative plan! Sure. I will use it to get better at it myself.
AzCopy has retry with exponential back-off policy to retry a failed request 20 times. There can be n number of network errors while transferring data over internet and AzCopy cannot account for all of them. Afterall, an error may or may not be fatal. If not fatal, it may be transient and go away with retries. So, it is by design.
The concern here is that AzCopy retries even 401 and 403 HTTP responses, your argument does not stand as HTTP error codes could determine what calls do not make sense to retry. The HTTP codes valid for retry are e.g. 408, 502, 503 and 504. It seems to me that it was easier on your side not to deal with this problem at all ,which is sad.
Which version of the AzCopy was used?
version 10.13.0
Which platform are you using? (ex: Windows, Mac, Linux)
Windows
What command did you run?
azcopy sync src-path https://storageaccount.blob.core.windows.net/container
What problem was encountered?
azcopy sync doesn’t fail with error but keep retrying even if the storage account doesn’t exists.
How can we reproduce the problem in the simplest way?
To run this command to a storage account that doesn't exists.
Have you found a mitigation/solution?
No.
Description
I’d like to ask you if the following azcopy’s behavior is designed. azcopy sync doesn’t fail and keep retrying even if the storage account doesn’t exists.
If it fails when the client get the first “dial tcp: lookup storageaccountthatdoesntexists.blob.core.windows.net: no such host” and write error messages on the console, I think it’s more user friendly. If it's a designed behavior, I’d l like you to think of fix this behavior in the future updates if possible.
The process keep retrying until time is up.
In the azcopy’s log, the following logs are recorded.