azure - 在 Azure 容器实例上执行命令时,_callback 中出现错误 "...websocket/_app.py",第 345 行

标签 azure azure-cli azure-container-instances

当我在德国中西部创建容器实例时

az container create -n aci-hello-world -g myRG -l germanywestcentral --image mcr.microsoft.com/azuredocs/aci-helloworld

然后尝试执行任何命令

az container exec -n aci-hello-world -g myRG --exec-command "ls"

命令未执行,并记录这些错误:

File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_app.py", line 345, in _callback
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 644, in _on_ws_msg
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_app.py", line 345, in _callback
File "D:\a\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/container/custom.py", line 644, in _on_ws_msg

在另一个区域启动相同的容器实例

az container create -n aci-hello-world -g myRG -l westeurope --image mcr.microsoft.com/azuredocs/aci-helloworld

有效。

最佳答案

经过一段时间的挣扎,我打开了一个支持案例,似乎有两种ACI部署模式:k8s和Atlas。如果容器实例是在 Atlas 背板上创建的,az container exec 将不起作用。

这是官方声明:

"The issue is seen on Atlas deployments, germanywestcentral is an Atlas-only region. And the issue is a failed exec command that only occurs when the deployment is on Atlas, it works in other regions on k8s. If you want to need to mitigate the issue then we could blacklist your subscription to prevent deployments from landing on Atlas. However, germanycentralwest is an Atlas only region, so you would no longer be able to deploy container groups to this region."

关于azure - 在 Azure 容器实例上执行命令时,_callback 中出现错误 "...websocket/_app.py",第 345 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68387664/

相关文章:

azure - Pyspark - 将具有数组结构的列扩展为新列

asp.net - 在 Azure 网站中将非 WWW 重定向到 WWW

Azure ServiceBus JMS 事务支持尚不清楚

azure - 希望在 IoT 嵌入式 Linux 设备上安装尺寸减小的 azure-cli (因此占用的磁盘空间更少)

azure - 如何使用 Azure CLI cmdlet 强制删除所有资源组而不提示确认?

azure - 在 Azure 容器实例中使用不同协议(protocol)配置相同端口

.net - ACI 未接收 UDP 通信

powershell - 无法从远程计算机在 Windows Server 2012 R2 中执行 DSC 文件

Azure CLI 任务不适用于 Windows 构建代理

azure - 在azure云实例上启动容器时有没有办法指定主机名