Skip to content

az container exec fails with python websocket error in Azure DevOps hosted agent #18275

@ghelyar

Description

@ghelyar

Describe the bug

Command Name
az container exec

Errors:

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

Unfortunately, that's the entire error.

To Reproduce:

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

- task: AzureCLI@2
  inputs:
    azureSubscription: ...
    scriptType: pscore
    scriptLocation: inlineScript
    inlineScript: |
	  az group create --location LOCATION --name RG_NAME
	  az container create -g RG_NAME -n ACI_NAME -f aci.yml
	  az container exec -n ACI_NAME --container-name CONTAINER_NAME --exec-command "ls"

Expected Behavior

Environment Summary

Azure DevOps hosted agent: windows-2019

C:\Windows\system32\cmd.exe /D /S /C ""C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin\az.cmd" --version"
azure-cli                         2.23.0 *

core                              2.23.0 *
telemetry                          1.0.6

Extensions:
azure-devops                      0.18.0

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Program Files\Common Files\AzureCliExtensionDirectory'

Python (Windows) 3.8.9 (tags/v3.8.9:a743f81, Apr  6 2021, 13:22:56) [MSC v.1928 32 bit (Intel)]


Additional Context

This was working on 2021-05-24 with 2.23.0, and started failing on 2021-05-25, the day 2.24.0 was released, but it's still using 2.23.0 according to the logs.

After the agent updated to 2.24.0, I started seeing an error with az container create, and not even getting this far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions