bebound / azure-cli

Azure Command-Line Interface
MIT License
0 stars 0 forks source link

Could not download an az webapp log. #18

Open bebound opened 1 year ago

bebound commented 1 year ago

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az webapp log download

Errors:

The command failed with an unexpected error. Here is the traceback:
('Connection broken: IncompleteRead(683 bytes read)', IncompleteRead(683 bytes read))
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 565, in _get_chunk_left
    chunk_left = self._read_next_chunk_size()
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 532, in _read_next_chunk_size
    return int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 582, in _read_chunked
    chunk_left = self._get_chunk_left()
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 567, in _get_chunk_left
    raise IncompleteRead(b'')
http.client.IncompleteRead: IncompleteRead(0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 459, in read
    return self._read_chunked(amt)
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 597, in _read_chunked
    raise IncompleteRead(b''.join(value))
http.client.IncompleteRead: IncompleteRead(683 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2580, in download_historical_logs
    _get_log(url, user_name, password, log_file)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/appservice/custom.py", line 2612, in _get_log
    data = r.read(1024)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 512, in read
    with self._error_catcher():
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/opt/homebrew/Cellar/azure-cli/2.43.0/libexec/lib/python3.10/site-packages/urllib3/response.py", line 455, in _error_catcher
    raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(683 bytes read)', IncompleteRead(683 bytes read))

To Reproduce:

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

Expected Behavior

Environment Summary

macOS-13.1-arm64-arm-64bit, Darwin 22.2.0
Python 3.10.8
Installer: HOMEBREW

azure-cli 2.43.0 *

Extensions:
azure-devops 0.25.0

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

Copy from https://github.com/Azure/azure-cli/issues/25098

similar-bot-test[bot] commented 1 year ago
Find similar issue https://github.com/Azure/azure-cli/issues/9860.
Issue title ProtocolError when following logs when tailing webapp logs
Create time 2019-07-04
Comment number 6