Skip to content

az storage blob download #21749

@AidarGatin

Description

@AidarGatin

%23%23%23 This is autogenerated. Please review and update as needed.

%23%23 Describe the bug

Command Name
az storage blob download

Errors:

The command failed with an unexpected error. Here is the traceback:
'MaxRetryError' object has no attribute 'lower'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 382, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fbb95be9510>: Failed to establish a new connection: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='aigiusclabcoretf.blob.core.windows.net%0a', port=443): Max retries exceeded with url: /aiguslabvaultbackup/vault-raft-backup-Sunday.snap (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbb95be9510>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/common/storageclient.py", line 321, in _perform_request
    response = self._httpclient.perform_request(request)
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/common/_http/httpclient.py", line 86, in perform_request
    response = self.session.request(request.method,
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='aigiusclabcoretf.blob.core.windows.net%0a', port=443): Max retries exceeded with url: /aiguslabvaultbackup/vault-raft-backup-Sunday.snap (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbb95be9510>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py", line 1969, in get_blob_to_path
    blob = self.get_blob_to_stream(
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py", line 2112, in get_blob_to_stream
    blob = self._get_blob(container_name,
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/blob/baseblobservice.py", line 1858, in _get_blob
    return self._perform_request(request, _parse_blob,
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/common/storageclient.py", line 430, in _perform_request
    raise ex
  File "/usr/local/lib/python3.10/site-packages/azure/multiapi/storage/v2018_11_09/common/storageclient.py", line 361, in _perform_request
    raise _wrap_exception(ex, AzureException)
azure.common.AzureException: HTTPSConnectionPool(host='aigiusclabcoretf.blob.core.windows.net%0a', port=443): Max retries exceeded with url: /aiguslabvaultbackup/vault-raft-backup-Sunday.snap (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fbb95be9510>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/local/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 713, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/usr/local/lib/python3.10/site-packages/azure/cli/command_modules/storage/__init__.py", line 377, in new_handler
    handler(ex)
  File "/usr/local/lib/python3.10/site-packages/azure/cli/command_modules/storage/__init__.py", line 282, in handler
    if isinstance(ex, AzureException) and 'incorrect padding' in ex.args[0].lower():
AttributeError: 'MaxRetryError' object has no attribute 'lower'

%23%23 To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az storage blob download -c {} -f {} --name {}

%23%23 Expected Behavior

%23%23 Environment Summary

Linux-5.4.0-1047-azure-x86_64-with, Alpine Linux v3.15
Python 3.10.2
Installer: DOCKER

azure-cli 2.34.1

%23%23 Additional Context

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions