question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Container.wait with timeout raises Connection Error

See original GitHub issue
    container = docker_client.containers.run(image = image, 
                                             command = cmd,
                                             detach = True, 
                                             auto_remove = False,
                                             )

container.wait(timeout = 10)

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

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
adnilssoncommented, Feb 8, 2021

I’m also experiencing this on 4.4.1.

I’m attempting to catch requests.exceptions.ReadTimeout as documented. However, no such error is catched. Instead, I’m presented with a trace of the same exceptions as @orodbhen

OS: Ubuntu 20.04.1 LTS Docker: 20.10.0

0reactions
zwimercommented, Jun 23, 2022

I have this issue on Fedora 36 as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve the Docker "Timeout exceeded while awaiting ...
Most often, this issue is caused by the machine running the Docker command being behind a proxy. When that's the case, the Docker...
Read more >
A reason for unexplained connection timeouts on Kubernetes ...
The Linux Kernel has a known race condition when doing source network address translation (SNAT) that can lead to SYN packets being dropped....
Read more >
Solving Timeout waiting for service container stability
It simply means that the container has not reached stability within the default timeout (300 seconds). As a result, all applications will be ......
Read more >
`docker-compose up` times out with UnixHTTPConnectionPool
ERROR : for testdb-data UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60) An HTTP request took too long to complete. Retry ...
Read more >
Troubleshoot common connection issues to Azure SQL ...
These connection problems can be caused by reconfiguration, firewall settings, a connection timeout, incorrect login information, or failure ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found