当我在德国中西部创建容器实例时
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/