Azure / AzureStor

R interface to Azure storage accounts
Other
64 stars 20 forks source link

Error when downloading from Azure File Share: Requested Range Not Satisfiable (HTTP 416) #94

Closed capncodewash closed 3 years ago

capncodewash commented 3 years ago

Hi there, I get the following error when I try to download any files from an Azure File Share with the AzureStor package:

 Requested Range Not Satisfiable (HTTP 416). Failed to complete Storage Services operation. Message:
.

I can list files no problem, as well as upload them. But downloads don't seem to work.

Example request:

access_key <- Sys.getenv("ACCESS_KEY")
test_file_endpoint <- AzureStor::storage_endpoint("https://myfilestorageexample.file.core.windows.net", key = access_key)
share <- AzureStor::file_share(test_file_endpoint, name = "testdata")

AzureStor::list_azure_files(share)
                   name   size isdir
1 cinnamon_pastries.jpg 145129 FALSE
2               Foo.txt      3 FALSE

AzureStor::download_azure_file(share, src = "Foo.txt")
  |                                                                                                                                     |   0%Error in download_azure_file_internal(share, src, dest, blocksize = blocksize,  : 
  Requested Range Not Satisfiable (HTTP 416). Failed to complete Storage Services operation. Message:

I'm using the following package versions (as reported by Renv):

AzureAuth    1.3.2   CRAN    1.3.2   CRAN  [1]   indirect
AzureGraph   1.3.1   CRAN    1.3.1   CRAN  [1]   indirect
AzureRMR     2.4.2   CRAN    2.4.2   CRAN  [1]   indirect
AzureStor    3.5.0   CRAN    3.5.0   CRAN  [1]     direct

I've tried both a normal access key and a Shared Access Signature - the same error occurs.

I've also tried adding a leading forward-slash to the file path (/Foo.txt), but that didn't make any difference.

Could you advise?

Thanks!

hongooi73 commented 3 years ago

I can't reproduce this problem. Does blob storage work?

capncodewash commented 3 years ago

I can't reproduce this problem. Does blob storage work?

Unfortunately blob storage has the same issue. I am wondering if it it could be a firewall/proxy issue. We can make the initial requests (including listings) with no issues, but downloads seem to fail.

I'll close this issue as it seems to be environment-specific. When I tried a different client (outside the corporate firewall), it worked without problems.

Thank you anyway!