Azure / Azure/azure-cli

Error Connecting to Running Container

Open
#15,922 3 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Container Instances Error Handling Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug

I'm trying to connect to an running container. I get the following error from AZ CLI

**Command Name**
`az container exec --resource-group myresourcegroup --name mycontainer --exec-command /bin/zsh`

**Errors:**
```
[Errno 0] Error
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())
lib/python3.6/site-packages/six.py, ln 703, in reraise
raise value
...
az/lib/python3.6/ssl.py, ln 407, in wrap_socket
_context=self, _session=session)
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()
OSError: [Errno 0] Error
```

## 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-5.4.39-linuxkit-x86_64-with-debian-10.6
Python 3.6.10
Installer: DEB

azure-cli 2.14.2

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.