This repository was archived by the owner on Jul 18, 2024. It is now read-only.
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
'content-length' error when trying to synccopy
blob container items to a file share #108
Closed
Description
Problem Description
First time blobxfer
user here. Apologies if I'm holding it wrong!
I'm trying to copy the contents of a blob container to a file share within the same storage account.
Not sure if this is supported as I'm also having trouble with using AzCopy
for the same task?
Azure blobxfer parameters output
============================================
Azure blobxfer parameters
============================================
blobxfer version: 1.9.3
platform: Linux-5.0.0-32-generic-x86_64-with-Ubuntu-19.04-disco
components: CPython=3.7.3-64bit azstor.blob=2.0.1 azstor.file=2.0.1 crypt=2.8 req=2.22.0
transfer direction: Azure -> Azure
workers: disk=0 xfer=48 md5=0 crypto=0
log file: None
dry run: False
resume file: None
timeout: connect=10 read=200 max_retries=1000
source mode: StorageModes.Auto
dest mode: StorageModes.File
server side copy: True
skip on: fs_match=False lmt_ge=False md5=False
delete: extraneous=False only=False
overwrite: True
recursive: True
rename single: False
strip components: 0
access tier: None
============================================
Steps to Reproduce
- Create a storage account called
storage-account
, with a blob containerblob-container
and a file share calledfile-share
- Create a SAS token that isn't limited by IP or otherwise restricted on any scopes, store this as an env. var
AZ_SAS_TOKEN
- upload a simple text file containing the text "abcd" to the blob container
- attempt to copy the contents of
blob-container
intofile-share
using the following command
blobxfer synccopy --remote-path https://storage-account.[snip]/blob-container?[sas] --sync-copy-dest-mode file --sync-copy-dest-storage-account storage-account --sync-copy-dest-storage-account $AZ_SAS_TOKEN --sync-copy-dest-remote-path file-share
Observe the attached error logs
Expected Results
The file testfile.txt
is copied to file-share
and contains abcd
Actual Results
testfile.txt
isn't written to file-share
Additional Logs
2019-11-01 16:19:50.126 INFO blobxfer.operations.synccopy:_run:825 blobxfer start time: 2019-11-01 16:19:50.125955+10:30
2019-11-01 16:19:50.126 DEBUG blobxfer.operations.synccopy:_initialize_transfer_threads:271 spawning 48 transfer threads
2019-11-01 16:19:51.622 ERROR blobxfer.operations.synccopy:start:919 'content-length'
Traceback (most recent call last):
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 917, in start
self._run()
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 834, in _run
for src_ase, dst_ase in self._bind_sources_to_destination():
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 775, in _bind_sources_to_destination
self._general_options.dry_run):
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 448, in files
creds, options, dry_run):
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 659, in _populate_from_list_blobs
ase = self._populate_from_arbitrary_url(rpath)
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 640, in _populate_from_arbitrary_url
remote_path, int(response.headers['Content-Length']))
File "***/.local/lib/python3.7/site-packages/requests/structures.py", line 52, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-length'
Traceback (most recent call last):
File "***/.local/bin/blobxfer", line 10, in <module>
sys.exit(cli())
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "***/.local/lib/python3.7/site-packages/blobxfer_cli/cli.py", line 1125, in synccopy
ctx.general_options, ctx.credentials, spec
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 929, in start
raise ex
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 917, in start
self._run()
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 834, in _run
for src_ase, dst_ase in self._bind_sources_to_destination():
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/synccopy.py", line 775, in _bind_sources_to_destination
self._general_options.dry_run):
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 448, in files
creds, options, dry_run):
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 659, in _populate_from_list_blobs
ase = self._populate_from_arbitrary_url(rpath)
File "***/.local/lib/python3.7/site-packages/blobxfer/operations/azure/__init__.py", line 640, in _populate_from_arbitrary_url
remote_path, int(response.headers['Content-Length']))
File "***/.local/lib/python3.7/site-packages/requests/structures.py", line 52, in __getitem__
return self._store[key.lower()][1]
KeyError: 'content-length'
Activity