The command failed with an unexpected error. Here is the traceback:
'MaxRetryError' object has no attribute 'lower'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 170, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/az/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/opt/az/lib/python3.6/socket.py", line 745, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
chunked=chunked,
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn
conn.connect()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/opt/az/lib/python3.6/site-packages/urllib3/connection.py", line 182, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fe9c1e225f8>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/az/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/az/lib/python3.6/site-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='theapothercarium.blob.core.windows.net', port=443): Max retries exceeded with url: /database-backups/20211021T131844Z.sql (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c1e225f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/common/storageclient.py", line 321, in _perform_request
response = self._httpclient.perform_request(request)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/common/_http/httpclient.py", line 92, in perform_request
proxies=self.proxies)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/opt/az/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='theapothercarium.blob.core.windows.net', port=443): Max retries exceeded with url: /database-backups/20211021T131844Z.sql (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c1e225f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 691, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 610, in upload_blob
return type_func[blob_type]()
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/operations/blob.py", line 603, in upload_block_blob
return client.create_blob_from_path(**create_blob_args)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/blob/blockblobservice.py", line 470, in create_blob_from_path
timeout=timeout)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/blob/blockblobservice.py", line 589, in create_blob_from_stream
timeout=timeout)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/blob/blockblobservice.py", line 1108, in _put_blob
return self._perform_request(request, _parse_base_properties)
File "/opt/az/lib/python3.6/site-packages/azure/multiapi/storage/v2018_11_09/common/storageclient.py", line 430, in _perform_request
raise ex
File "/opt/az/lib/python3.6/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='theapothercarium.blob.core.windows.net', port=443): Max retries exceeded with url: /database-backups/20211021T131844Z.sql (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fe9c1e225f8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 712, in _run_job
return cmd_copy.exception_handler(ex)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 368, in new_handler
handler(ex)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/storage/__init__.py", line 273, in handler
if isinstance(ex, AzureException) and 'incorrect padding' in ex.args[0].lower():
AttributeError: 'MaxRetryError' object has no attribute 'lower'
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
Linux-5.11.0-38-generic-x86_64-with-debian-bullseye-sid, Ubuntu 20.04.3 LTS
Python 3.6.10
Installer: DEB
azure-cli 2.29.0 *
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az storage blob uploadErrors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az storage blob upload --account-name {} --container-name {} --name {} --file {} --sas-token {}Expected Behavior
Environment Summary
Additional Context