docker / docker/docker-py

(requests.packages.urllib3.connectionpool) Connection pool is full, discarding connection: localhost

Open
#1,636 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

Hello,

i've a problem with version 2.3.0 when trying to get my script running. It fails on calling docker_client.containers.get(container_name):

2017-06-09 11:07:29,404 WARNING (requests.packages.urllib3.connectionpool) Connection pool is full, discarding connection: localhost
Traceback (most recent call last):
  File "./f5fpc-client.py", line 134, in <module>
    sys.exit(main())
  File "./f5fpc-client.py", line 43, in main
    container = docker_client.containers.get(container_name)
  File "/home/mlohr/.local/lib/python2.7/site-packages/docker/models/containers.py", line 757, in get
    resp = self.client.api.inspect_container(container_id)
  File "/home/mlohr/.local/lib/python2.7/site-packages/docker/utils/decorators.py", line 21, in wrapped
    return f(self, resource_id, *args, **kwargs)
  File "/home/mlohr/.local/lib/python2.7/site-packages/docker/api/container.py", line 750, in inspect_container
    self._get(self._url("/containers/{0}/json", container)), True
  File "/home/mlohr/.local/lib/python2.7/site-packages/docker/utils/decorators.py", line 47, in inner
    return f(self, *args, **kwargs)
  File "/home/mlohr/.local/lib/python2.7/site-packages/docker/api/client.py", line 183, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/sessions.py", line 526, in get
    return self.request('GET', url, **kwargs)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/sessions.py", line 513, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/sessions.py", line 623, in send
    r = adapter.send(request, **kwargs)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 587, in urlopen
    timeout_obj = self._get_timeout(timeout)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 302, in _get_timeout
    return Timeout.from_float(timeout)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 154, in from_float
    return Timeout(read=timeout, connect=timeout)
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 94, in __init__
    self._connect = self._validate_timeout(connect, 'connect')
  File "/home/mlohr/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 127, in _validate_timeout
    "int, float or None." % (name, value))

Requests version is 2.17.3.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the traceback through docker/models/containers.py, docker/api/container.py, and docker/api/client.py, focusing on docker_client.containers.get(container_name). Compare the reported docker-py 2.3.0 and Requests 2.17.3 versions, then reproduce the call if possible. The issue does not define the expected behavior or a clear completion condition.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.