[App Service] az webapp ssh silently exits on macOS with Python 3.14 and Invoke 2.2.0
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug
On macOS with Azure CLI 2.89.1 installed by Homebrew, az webapp ssh establishes the App Service tunnel and opens a Paramiko SSH channel, but immediately closes without displaying an error. The command exits with status 0.
With --debug, the interactive session reports buffer overflow. Azure CLI catches the exception in _start_ssh_session, logs it only at INFO/debug level, closes the connection, and returns success.
The bundled Invoke 2.2.0 uses a 4-byte "HH" buffer for TIOCGWINSZ. Python 3.14 detects the 8-byte write on macOS and raises SystemError: buffer overflow. Updating Invoke to 2.2.1 fixes the command.
Upstream: https://github.com/pyinvoke/invoke/issues/1038
Python 3.14 tracking: https://github.com/Azure/azure-cli/issues/32869
Related command
az webapp ssh --resource-group --name
Errors
No error appears normally; the command silently returns with exit status 0.
With --debug:
paramiko.transport: Secsh channel 0 opened.
paramiko.transport: [chan 0] EOF sent (0)
azure.cli.command_modules.appservice.custom: buffer overflow
Client disconnected
websocket close: Connection failure.
az_command_data_logger: exit code: 0
Issue script & Debug output
``shell
az webapp ssh
--resource-group
--name
--debug
The tunnel and SSH channel are established, followed by:
paramiko.transport: Secsh channel 0 opened.
paramiko.transport: [chan 0] EOF sent (0)
azure.cli.command_modules.appservice.custom: buffer overflow
Client disconnected
websocket close: Connection failure.
az_command_data_logger: exit code: 0
Invoke 2.2.0's `invoke/terminals.py` contains:
```python
fmt = "HH"
buf = struct.pack(fmt, 0, 0)
result = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ, buf)
Invoke 2.2.1 uses the correct 8-byte "HHHH" structure. Installing 2.2.1 into Azure CLI's environment makes the same command work.
Expected behavior
The command should maintain an interactive SSH session. If terminal creation fails, Azure CLI should display the exception and return a nonzero status instead of silently closing with status 0.
Environment Summary
azure-cli 2.89.1
core 2.89.1
telemetry 1.1.0
Installation: Homebrew
Python location: /opt/homebrew/Cellar/azure-cli/2.89.1/libexec/bin/python
Python: 3.14.7
Bundled Invoke: 2.2.0
Fabric: 3.2.2
OS: macOS 26.6.2
Architecture: arm64
Additional context
Homebrew's current Azure CLI 2.89.1 formula depends on Python 3.14 and packages Invoke 2.2.0.
Working dependency update:
"$(brew --prefix azure-cli)/libexec/bin/python" \
-m pip install --ignore-installed "invoke==2.2.1"
Another workaround is az webapp create-remote-connection plus the system SSH client.
Suggested fixes:
- Package a Python 3.14-compatible Invoke version.
- Do not suppress the session exception and report success when SSH failed.
- Ngôn ngữ chính
- Python
- Star
- 4.7k
- Fork
- 3.5k
- Merge trung bình
- 5 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 54
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Azure/azure-cli
-
customer-reported Service Attention
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Azure/azure-cli#34267 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add support for cli completion in git bash for windowsCó thể đã có người làm @a0x1ab đã nhận 5 ngày trước. Đang mởcustomer-reported Service Attention
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Azure/azure-cli#34150 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
act-observability-squad Auto-Assign ContainerApp Output Service Attention
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Azure/azure-cli#33149 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
act-codegen-extensibility-squad Auto-Assign Documentation MySQL Possible-Solution Service Attention Similar-Issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Azure/azure-cli#33009 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
act-codegen-extensibility-squad Auto-Assign AzureStackHCI Documentation needs-triage Service Attention
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Azure/azure-cli#32586 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Azure/azure-cli
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
GoogleCloudPlatform/gce-rescue#195 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
intake mcp-intake needs-ac needs-human-review priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Ikalus1988/MisakaNet#3848 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug size:XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày