-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container.wait with timeout raises Connection Error #1966
Comments
I am experiencing this as well. This started occuring after upgrading Docker from |
I can see some entries in the backtrace that seem to be related to reading chunked response; might this be related to psf/requests#4402 ? |
I already made this comment on #1374, but this seems to be a better place for it. I'm still seeing this in 3.4.1: OS: CentOS 7.5 As before, it does not occur with the In my case it occurs when running
It seems that |
I'm also experiencing this on 4.4.1. I'm attempting to catch OS: Ubuntu 20.04.1 LTS |
As a workaround, until the low level exceptions are converted to a docker-timeout-exception, I use import requests
try:
result = container.wait(timeout=30)
except (requests.exceptions.ReadTimeout, requests.exceptions.ConnectionError):
# timeout occurred
pass |
I have this issue on Fedora 36 as well. |
I ran into this problem using version 7.0.0 of docker-py and version 3.11 of python. The docs say |
@jrab89 I observed this in 2021, see my comment above, and wasn't the first one at that. It seems that the maintainers of docker-py cannot, or don't want to, change it. There must be some obstacle that prevents them from catching low-level exceptions at the right places and raising a "docker-timeout-occurred" exception instead. |
Without a timeout, everything works fine. With a timeout I get the following Exception:
ConnectionError(ReadTimeoutError('None: None',),)
The API says it should be raising a requests.exceptions.ReadTimeout
Name: docker
Version: 2.7.0
Summary: A Python library for the Docker Engine API.
Home-page: https://github.com/docker/docker-py
Author: Joffrey F
Author-email: joffrey@docker.com
License: Apache License 2.0
Location: /usr/local/lib/python3.6/site-packages
Requires: six, websocket-client, requests, docker-pycreds
The text was updated successfully, but these errors were encountered: