Azure / Azure/azure-cli

`az container exec` fails with 'certificate verify failed'

Open
#15,121 15 comments 1 reaction 0 assignees View on GitHub
act-observability-squad Container Instances customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 10h
Merged PRs (30d)
64

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az container exec`

**Errors:**
```
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
Traceback (most recent call last):
python3.6/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
raise ex
cli/core/commands/__init__.py, ln 718, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 711, in _run_job
six.reraise(*sys.exc_info())
...
az/lib/python3.6/ssl.py, ln 817, in __init__
self.do_handshake()
az/lib/python3.6/ssl.py, ln 1077, in do_handshake
self._sslobj.do_handshake()
az/lib/python3.6/ssl.py, ln 689, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
```

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

- _Put any pre-requisite steps here..._
- `az container exec --resource-group {} --name {} --exec-command {}`

## Expected Behavior

## Environment Summary
```
Linux-4.15.0-1093-azure-x86_64-with-debian-stretch-sid (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.11.1

Extensions:
ai-examples 0.2.3

```
## Additional Context

Contributor guide

Open the contributing guide

Research direction

Start with the reported `az container exec --resource-group {} --name {} --exec-command {}` command in the listed Cloud Shell environment, then trace the failure through `knack/cli.py` and the Python `ssl.py` handshake shown in the traceback. Done means the command completes without the certificate verification error, with a regression check for the reported environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.