Recommand · July 15, 2021 0

Error "…websocket/_app.py", line 345, in _callback" when executing command on Azure Container Instance

When I creating a container instance in Germany West Central

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

and then try to execute any command

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

the command is not executed and these errors are logged:

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

Starting the same container instance in another region

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

works.

After struggling for a while I opened a support case and it seems there are 2 modes of deployments of ACI: k8s and Atlas. If the container instance is created on an Atlas backplane, az container exec is not working.

This was the official statement:

"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."