Skip to content

PIP ProtocolError 'Connection aborted' on trying to connect to pypi.python.org even if no-link is specified #5812

@debraj-manna

Description

@debraj-manna

Environment

  • pip version: 7.1.2
  • Python version: 2.7.6
  • OS: Ubuntu 14.04

Description
On trying to do a install via PIP like below

sudo pip install -U --verbose --force-reinstall --allow-unverified --no-index --find-links=/tmp/chef-cache/patroni patroni[zookeeper]==1.4.4

I am seeing logs like below and it is taking more than an hour for the installation to complete even though I am trying to do the installation from local.

 The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Getting page https://pypi.python.org/simple/patroni/
Starting new HTTPS connection (1): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=4, connect=None, read=None, redirect=None)
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (2): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=3, connect=None, read=None, redirect=None)
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (3): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=2, connect=None, read=None, redirect=None)
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (4): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=1, connect=None, read=None, redirect=None)
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (5): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=0, connect=None, read=None, redirect=None)
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (6): pypi.python.org
Could not fetch URL https://pypi.python.org/simple/patroni/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/patroni/ (Caused by ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))) - skipping
1 location(s) to search for versions of patroni:
* https://pypi.python.org/simple/patroni/
Getting page https://pypi.python.org/simple/patroni/
Starting new HTTPS connection (7): pypi.python.org
Incremented Retry for (url='/simple/patroni/'): Retry(total=4, connect=None, read=None, redirect=None)
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(99, 'Cannot assign requested address'))': /simple/patroni/
Starting new HTTPS connection (8): pypi.python.org

Even though the installation is from local and --no-index is specified PIP is still trying to connect to pypi.python.org. I also tried by specifying --disable-pip-version-check (even though this is implied by --no-index option) but still PIP was trying to connect to pypi.python.org.

This can slow down the installation considerably if in a system without internet firewall is dropping the traffic instead of reject.

I think if --no-index is specified and --find-links is pointing to a local file system then PIP should not try to connect to pypi.python.org.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationtype: supportUser Support

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions