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

Issue with MEO ISP in Portugal - 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) #5374

Open
andmart opened this Issue May 6, 2018 · 59 comments

Comments

Projects
None yet
@andmart
Copy link

andmart commented May 6, 2018

  • Pip version: 10.0.0
  • Python version: 3.5.2
  • Operating system: Ubuntu 16.04

Description:

I cannot install packages using pip

What I've run:

pip install cython
pip install kivy
pip install --upgrade pip

all this leads to the same error as below.

pip install kivy -v

Outputs:

Created temporary directory: /tmp/pip-ephem-wheel-cache-rs27mmeh
Created temporary directory: /tmp/pip-install-dtnthpzj
Collecting kivy
  1 location(s) to search for versions of kivy:
  * https://pypi.python.org/simple/kivy/
  Getting page https://pypi.python.org/simple/kivy/
  Looking up "https://pypi.python.org/simple/kivy/" in the cache
  Returning cached "301 Moved Permanently" response (ignoring date and etag information)
  Looking up "https://pypi.org/simple/kivy/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.org
  Incremented Retry for (url='/simple/kivy/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/kivy/
  Starting new HTTPS connection (2): pypi.org
  Incremented Retry for (url='/simple/kivy/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/kivy/
  Starting new HTTPS connection (3): pypi.org
  Incremented Retry for (url='/simple/kivy/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/kivy/
  Starting new HTTPS connection (4): pypi.org
  Incremented Retry for (url='/simple/kivy/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/kivy/
  Starting new HTTPS connection (5): pypi.org
  Incremented Retry for (url='/simple/kivy/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/kivy/
  Starting new HTTPS connection (6): pypi.org
  Could not fetch URL https://pypi.python.org/simple/kivy/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/kivy/ (Caused by ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))) - skipping
  Could not find a version that satisfies the requirement kivy (from versions: )
Cleaning up...
No matching distribution found for kivy
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/commands/install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/operations/prepare.py", line 243, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/req/req_install.py", line 307, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/local/lib/python3.5/dist-packages/pip-10.0.0-py3.5.egg/pip/_internal/index.py", line 533, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for kivy
You are using pip version 10.0.0, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
@sigmavirus24

This comment has been minimized.

Copy link
Member

sigmavirus24 commented May 6, 2018

Are you using a proxy?

@pradyunsg

This comment has been minimized.

Copy link
Member

pradyunsg commented May 6, 2018

Hey @andmart!

This seems to be a network issue. Could you provide us with more details of how you're connecting, such as whether you're connecting through a proxy and whether your SSL version is new enough?

@carlos-menezes

This comment has been minimized.

Copy link

carlos-menezes commented May 6, 2018

I am having the same issue. To reply to your question, @pradyunsg , I am not connecting through a proxy (not that I know of) and I don't know how to check if my SSL version is recent enough.

@carlos-menezes

This comment has been minimized.

Copy link

carlos-menezes commented May 6, 2018

Update: Running the pip install <package> command via Powershell does not give this error.

@sigmavirus24

This comment has been minimized.

Copy link
Member

sigmavirus24 commented May 7, 2018

@crlsmnzs So it sounds like you were using ubuntu 16.04, pip 10.0.0, and python 3.5 as well in your initial test. Is that accurate?

@andmart

This comment has been minimized.

Copy link

andmart commented May 7, 2018

@sigmavirus24 no. I am not using a proxy. Using my home network.
Openssl version : 1.02g

@pradyunsg

This comment has been minimized.

Copy link
Member

pradyunsg commented May 7, 2018

This error would usually happen when there's something like a proxy or a firewall blocking connections.

@andmart

This comment has been minimized.

Copy link

andmart commented May 7, 2018

I think you are right. It worked when connected in another network. But when @sigmavirus24 asked if I am using a proxy, I tried a VPN and it also did not wok.

@carlos-menezes

This comment has been minimized.

Copy link

carlos-menezes commented May 7, 2018

@sigmavirus24 I'm using Windows 10, pip 10.0.0 and Python 3.6.5.

@Tmpod

This comment has been minimized.

Copy link

Tmpod commented Aug 24, 2018

I'm getting the exact same issue. I'm using nextcloudpi on my RPi3 Model B. This issue started when I upgraded my internet plan and the ISP technitians switched my old router for a new one. That morning I had installed a package, but in the afternoon, after the router switch, I started getting this problem. I don't have a clue how to disable the router firewall or give it a whitelist. Guess I have some research to do.

@Ilhicas

This comment has been minimized.

Copy link

Ilhicas commented Aug 24, 2018

Same issue here, not connected through a proxy, same issues are present if connected via VPN to another network. Besides the issue is intermittent.

On ubuntu 18.04
'OpenSSL 1.1.0g 2 Nov 2017'

Also having the same issues under others servers provided by fastly

vagrantup.com and python.org all of which have changes to the TLS forcing to TLS v1.2

The proxy is referred everywhere as possible issues, I'm not behind any corporate firewall. I'm using a simple business connection by a Portuguese ISP

Haven't tested under windows to check for issues on network yet, will update.

Curl also has issues with those even forcing it to tls , chrome also. So not a pip isolated problem, but rather a problem with network, just not proxy related.

@Tmpod

This comment has been minimized.

Copy link

Tmpod commented Aug 24, 2018

eheheh. Is it MEO? Because I just upgraded my internet and got a new MEO router (they promised the FiberGateWay, but I got a crappy one. Still trying to solve that one out) and I started having this error on my RPi.

@andmart

This comment has been minimized.

Copy link

andmart commented Aug 25, 2018

Yep. MEO here.

@Ilhicas

This comment has been minimized.

Copy link

Ilhicas commented Aug 25, 2018

Yes, can confirm it's MEO, we've tried a mobile hotspot from NOS and we have been able to reach vagrantup.com rubygems.org python.org pypa.io , all fastly served at tls 1.2

Failure on MEO ISP network in Coimbra Area with the following OS's:

Network 1 (Business MEO ISP connection) :
Ubuntu 18.04 - Machine1
Ubuntu 16.04 - Machine2
Windows 10 Professional - Machine1

Network 2 (Home MEO ISP connection) :
Ubuntu 18.04 - Machine1

Success on NOS mobile hotspot:
Ubuntu 18.04 - Machine1
Ubuntu 16.04 - Machine2
Windows 10 Professional - Machine1

Haven't been able to test other ISP's.
However and this is the strange part:

I've been able to successfully use pip without failure using Docker NAT on MEO ISP:
docker run -it --rm python:alpine sh / # pip install requests Collecting requests Downloading https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl (91kB) 100% |████████████████████████████████| 92kB 776kB/s Collecting certifi>=2017.4.17 (from requests) Downloading https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl (147kB) 100% |████████████████████████████████| 153kB 2.5MB/s Collecting idna<2.8,>=2.5 (from requests) Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB) 100% |████████████████████████████████| 61kB 5.4MB/s Collecting urllib3<1.24,>=1.21.1 (from requests) Downloading https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 7.0MB/s Collecting chardet<3.1.0,>=3.0.2 (from requests) Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB) 100% |████████████████████████████████| 143kB 6.0MB/s Installing collected packages: certifi, idna, urllib3, chardet, requests Successfully installed certifi-2018.8.24 chardet-3.0.4 idna-2.7 requests-2.19.1 urllib3-1.23 / #
However unable to install while connected via wifi or ethernet
All dns cache has been flushed, nslookup returns the same IP address on both NOS and MEO network.
ilhicas@ilhicas-HP-Notebook:~$ pip install virtualenv Collecting virtualenv Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(104, 'Connection reset by peer'))': /simple/virtualenv/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(104, 'Connection reset by peer'))': /simple/virtualenv/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(104, 'Connection reset by peer'))': /simple/virtualenv/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(104, 'Connection reset by peer'))': /simple/virtualenv/

@Ilhicas

This comment has been minimized.

Copy link

Ilhicas commented Aug 25, 2018

Yet another strange report.

When connected to MEO-WIFI ( using the same router ) i'm able to reach all above mentioned domains correctly as well as pip install.

I've also edited nameservers to google without any luck, flushing cache dns etc..on the private network.

@lalvarezguillen

This comment has been minimized.

Copy link

lalvarezguillen commented Sep 2, 2018

I just moved to Coimbra. I can confirm I get the same error, only with MEO.

I ask that you please update this thread if you find a solution. Is there any point in contacting MEO? I wouldn't know what to say...

@Ilhicas

This comment has been minimized.

Copy link

Ilhicas commented Sep 3, 2018

I've had this error only in Coimbra, been to Évora this past weekend without issues reaching the sites mentioned before under a Windows OS, I hadn't tried via Ubuntu (given other issues)

Regarding the contacting MEO, I haven't done it also due to the same reasons, If you have a technical issue with their hardware it's already a pain to get it fixed, so I can only imagine the terrors you would go through explaining this.. :D

The only NOT a real solution for now is to switch to their MEO-WIFI infra when you need it. And besides that, you can always use docker, as from what it seems under a docker container I have no issues.. That alone tilts me.. Can't figure out why yet. So you could create a volume from the container to the host to the place you wish to do the pip install, maybe some virtual environment creation with all the packages you wish to install via pip. When I get the time I'll post here that solution

@lalvarezguillen

This comment has been minimized.

Copy link

lalvarezguillen commented Sep 4, 2018

@Ilhicas thanks for sharing your findings man.

I'm sticking to Vodafone for the time being, but I'll make sure to take a look at your Docker workaround and see if I can figure out the root of the issue.

@ferrolho

This comment has been minimized.

Copy link

ferrolho commented Sep 8, 2018

I can confirm I am having the same issue. I am also with MEO as the service provider in Viseu, Portugal.
I'm using my mobile hotspot as a workaround in the meanwhile...

@citylife4

This comment has been minimized.

Copy link

citylife4 commented Sep 8, 2018

Confirming the same issue with MEO service provider in Porto, Portugal.
I also have been trouble to connect to https://www.python.org/ , https://docs.python.org/ and https://docs.python.org/ websites, with a "This site can’t be reached" error.
I've tried to change DNS provider, but that did not solve the issue...
I've have been having those issues for a long time, however, mysteriously there are times that pip and docs works....

@citylife4

This comment has been minimized.

Copy link

citylife4 commented Sep 9, 2018

Hello!!
I've found a solution! I've change not only the IPv4 DNS but also the IPv6 to another provider then the ISP one, and now it works!
Cheers!

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 20, 2018

@citylife4 and everyone else here.
I'm from MEO too and I'm having the same issue here.
I've changed the DNS on my MEO router to cloudflare's, google's, etc, but no luck on making pypi, pythonhosted or anything else work.
wget and curl give tls errors, and the browsers get stuck on error pages (tls errors too).
I'm assuming this is the same issue since I'm having the same errors.
Connecting to other networks, or strangely enough, using a VM ( Don't ask me how) seems to fix it.
What can I do for now besides using another network, since it's preferable to use my own home connection and it's a PIA to offload the .tar.gz python packages from my server to install them with python.

@citylife4

This comment has been minimized.

Copy link

citylife4 commented Sep 20, 2018

If you have disabled IPv6 (I didn't try to change the IPv6 DNS, but in theory, it should also work) and changed IPv4 DNS and it still doesn't work, I don't know what you can do...
For me has been working fine ever since!

UPDATE : Changing the IPv6 DNS provider does not resolve this, IPv6 needs to be disabled.

Tested on Windows 10 + Debian on Rasp Pi

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 20, 2018

Even removing MEO's DNS from their router via telnet and replacing them with my own (IPv4 and IPv6) doesn't work. Disabling IPv6 in the kernel would be even more unpratical for me than connecting to another network. Is this a problem on MEO's infrastructure(network) or router? I'm really puzzled since this doesn't work on my Linux distro or Windows 10, but works on Linux or BSD VMs...

@andmart

This comment has been minimized.

Copy link

andmart commented Sep 21, 2018

I have faced the same problems after @citylife4 pointed out the DNS solution. What really worked for me was use nordvpn, but I will reinforce with MEO to fix this.

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 21, 2018

For now, my solution is temporarily disabling IPv6 on Linux with sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' , that way it isn't anything permanent. But I still want this fixed on MEO's side, so I'll try to figure this out, since every time the router reboots, it keeps my DNS server settings (either google's or cloudflare's), but it creeps their IPv4 and IPv6 DNS back in on set 100.
Pip strangely works with IPv6 disabled, which is nothing short of bizarre, but I'll look onto this further.

@pfmoore

This comment has been minimized.

Copy link
Member

pfmoore commented Sep 21, 2018

This issue seems to be about specific ISPs (I'm not sure, as I don't recognise the names, they are presumably local to one particular region?). If so, an someone suggest a more useful title for the issue to help anyone with a similar problem locate it?

Also, I don't see anything actionable for pip here, so I suggest that the issue can be closed (which won't prevent further comments, if anyone has extra experience to add).

@pfmoore

This comment has been minimized.

Copy link
Member

pfmoore commented Sep 21, 2018

@osl21 Thanks - title updated.

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 21, 2018

ewogICJnZW9pcCI6IHsKICAgICJjaSI6ICJsaXNib24iLAogICAgInN0IjogIjExIiwKICAgICJjdCI6ICJwb3J0dWdhbCIsCiAgICAiY28iOiAiRVUiLAogICAgImNfYXNuIjogIjMyNDMiLAogICAgImNfYXNuX25hbWUiOiAibWVvIC0gc2Vydmljb3MgZGUgY29tdW5pY2Fjb2VzIGUgbXVsdGltZWRpYSBzLmEuIiwKICAgICJyX2lwIjogIjg0LjIwMC42OS44MCIsCiAgICAicl9hc24iOiAiMzE0MDAiLAogICAgInJfYXNuX25hbWUiOiAiYWNjZWxlcmF0ZWQgaXQgc2VydmljZXMgZ21iaCIsCiAgICAicl9jaSI6ICJiYW1iZXJnIiwKICAgICJyX3N0IjogIkJZIiwKICAgICJyX2N0IjogImdlcm1hbnkiLAogICAgInJfY28iOiAiRVUiCiAgfSwKICAicG9wTGF0ZW5jeSI6IHsKICAgICJsaHIiOiA0NCwKICAgICJsY3kiOiAzOSwKICAgICJjZGciOiA0NiwKICAgICJtYWQiOiA0OSwKICAgICJmcmEiOiA1NiwKICAgICJoaG4iOiA1NiwKICAgICJhbXMiOiA1MCwKICAgICJibWEiOiA3OSwKICAgICJoZWwiOiA4OCwKICAgICJqZmsiOiAxMjEsCiAgICAiaGtnIjogMzE2CiAgfSwKICAicG9wQXNzaWdubWVudHMiOiB7CiAgICAiYWMiOiAibGN5IiwKICAgICJhcyI6ICJoaG4iCiAgfSwKICAicmVxdWVzdCI6IHsKICAgICJyZXNvbHZlcl9pcCI6ICI4NC4yMDAuNjkuODAiLAogICAgInJlc29sdmVyX2FzX25hbWUiOiAiQUNDRUxFUkFURUQtSVQsIERFIiwKICAgICJyZXNvbHZlcl9hc19udW1iZXIiOiAiMzE0MDAiLAogICAgInJlc29sdmVyX2NvdW50cnlfY29kZSI6ICJERSIsCiAgICAiY2xpZW50X2lwIjogIlJFREFDVEVEIiwKICAgICJjbGllbnRfYXNfbmFtZSI6ICJNRU8tUkVTSURFTkNJQUwsIFBUIiwKICAgICJjbGllbnRfYXNfbnVtYmVyIjogIjMyNDMiLAogICAgInRpbWUiOiAiMjAxOC0wOS0yMVQxODowNzozMy4wMDBaIiwKICAgICJob3N0IjogInd3dy5mYXN0bHktZGVidWcuY29tIiwKICAgICJhY2NlcHQiOiAidGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWw7cT0wLjksKi8qO3E9MC44IiwKICAgICJ1c2VyYWdlbnQiOiAiTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjo2MC4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94LzYwLjAiLAogICAgImFjY2VwdGxhbmd1YWdlIjogImVuLVVTLGVuO3E9MC41IiwKICAgICJhY2NlcHRlbmNvZGluZyI6ICJnemlwIiwKICAgICJmYXN0bHlzZXJ2ZXJpcCI6ICIxNTEuMTAxLjEyLjY0IiwKICAgICJ4ZmYiOiAiIiwKICAgICJkYXRhY2VudGVyIjogIkZSQSIsCiAgICAiYmFuZHdpZHRoX21icHMiOiAiMTEuMzYiLAogICAgImN3bmQiOiA4NSwKICAgICJuZXh0aG9wIjogIjE0OS4xMS4yMC4xMTciLAogICAgInJ0dCI6IDUwLjEzLAogICAgImRlbHRhX3JldHJhbnMiOiAwLAogICAgInRvdGFsX3JldHJhbnMiOiAwCiAgfQp9
I'm currently using dns.watch DNS servers, but it fails with Cloudflare's (1.1.1.1) or Google's (8.8.8.8) .

@dstufft

This comment has been minimized.

Copy link
Member

dstufft commented Sep 21, 2018

@osl21 Just to be clear, that blob was made when using dns.watch servers, which do not exhibit the problem?

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 21, 2018

No, all of the DNS exhibit the problem, only disabling IPv6 fixes it. No matter what DNS I use, I can't go to pypi or use pip, I'm just using DNS.WATCH because of preference.

@dstufft

This comment has been minimized.

Copy link
Member

dstufft commented Sep 21, 2018

Ok thanks.

@andmart

This comment has been minimized.

Copy link

andmart commented Sep 22, 2018

@osl21 Disabling IPv6 on my machine with sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' worked for me too.

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 22, 2018

It works, but this is a really nasty issue on MEO's or Fastly's end (since I can't acess some of their services, specifically python-related) , disabling IPv6 isn't much of a solution.

@supine

This comment has been minimized.

Copy link

supine commented Sep 22, 2018

For those experiencing this v6 issue it would be very helpful if you could provide a packet capture of it failing.
Please send them to support@fastly.com and mention this issue and our ticket ECO-2664

@osl21

This comment has been minimized.

Copy link

osl21 commented Sep 23, 2018

@supine Can you give us steps (tools or such) in order to provide you the said packet capture (like in a pip install or acessing pypi via browser or curl/wget)?

@Yuripetusko

This comment has been minimized.

Copy link

Yuripetusko commented Sep 24, 2018

I have the same problem with Portuguese NOS provider

@HFRibeiro

This comment has been minimized.

Copy link

HFRibeiro commented Oct 6, 2018

Guys just change the IpV4 DNS to 8.8.8.8 or 8.8.4.4 and the IpV6 DNS to 2001:4860:4860::8888 or 2001:4860:4860::8844.
This is for sure due to the websites they are blocking in Portugal to prevent piracy...

@osl21

This comment has been minimized.

Copy link

osl21 commented Oct 6, 2018

@SirRibeiro As previously mentioned, it fails with any DNS, be it google, cloudflare's or any other. The issue is with cloudflare's/fastly side, not with the piracy blacklist.

@HFRibeiro

This comment has been minimized.

Copy link

HFRibeiro commented Oct 6, 2018

@osl21 oh ok, sorry, for me just changing the DNS was enough.

@lvale

This comment has been minimized.

Copy link

lvale commented Oct 7, 2018

Just bumped into this, and even changing the DNS's didn't help.

I'm on MEO fiber and just opened an issue on their support.

Using the mobile hotspot from my mobile phone (also MEO) sorted the issue for now..

@supine

This comment has been minimized.

Copy link

supine commented Oct 8, 2018

What kind of router does the ISP supply? Is anyone able to run a test bypassing the supplied router?

@supine

This comment has been minimized.

Copy link

supine commented Oct 8, 2018

@osl21 you can take a capture with a tool like tcpdump. Command would look something like:

tcpdump -n -nn -N -s 0 -i INTERFACE -w /PATH/TO/FILE.pcap "net 2a04:4e40::/29"

where INTERFACE is your "external" interface where your default route would go out.

@lvale

This comment has been minimized.

Copy link

lvale commented Oct 9, 2018

ok. Meo solution one was to ask me to reboot the router.....As expected is not a solution

The details are

Technicolor Gateway

Product Name: TG789vac v2

Serial Number: xxxxxxxx

Software Release: 10.5.8.I

Software Variant: BQ

Boot Loader Version: 2.0.85

Product Code: 3743534A

Board Name: VANT-6

@supine

This comment has been minimized.

Copy link

supine commented Oct 9, 2018

@lvale thank you for that information.

There is a known issue with Thomson / Technicolor Gateway routers where they reset the IPv6 flow label in the middle of a TCP session when it is supposed to be static from the SYN to the FIN.

Large networks and service providers, Fastly included, use ECMP for load balancing. Ideally the path selection uses hashing that keeps a single TCP session on the same path.

Although Fastly mostly avoids using IPv6 flow label as an input into hashing:

  • some equipment does not let you exclude it
  • some other networks choose to configure it.

By reseting the IPv6 flow label in the middle of the TCP session the router is likely forcing ECMP rehashing somewhere in the path between yourself and Fastly. This could mean that subsequent packets land on the wrong cache or even in the wrong POP.

You can prove it's the router by connecting your computer directly to the ONT and retesting.

I don't have any straightforward solution for you. Your options appear to be:

  • seek out the latest firmware for your device, see if that fixes the problem
  • replace the supplied router with one of your own
@Ilhicas

This comment has been minimized.

Copy link

Ilhicas commented Oct 9, 2018

Different equipment here, yet its the same brand, just an higher version from the technical details, just tested and it seemed to work now, but as mentioned previously the error occurrence is non-deterministic.

Technicolor Gateway

Product Name: TG784n v3

Software Release: 10.2.1.O

Software Variant: DS

Boot Loader Version: 1.1.2

Product Code: 3690227E

Board Name: DANT-U

@lvale

This comment has been minimized.

Copy link

lvale commented Oct 9, 2018

With a little more searching found a tentative solution here https://www.reddit.com/r/portugal/comments/8cjj3s/developers_com_meo_em_casa_conexões_bloqueadas/

which is basically to disable ipv6 on the router/gateway

telnet to router/gateway

telnet _ipaddress_
dhcp serverv6 config state=disabled
ip ifconfig intf=LocalNetwork ipv6=disabled
saveall
exit

Not sure it will last the "periodic" updates by the ISP....

@jgrocha

This comment has been minimized.

Copy link

jgrocha commented Oct 21, 2018

One workaround is to disable IPv6.

  1. Disable IPv6
  2. Run pip
  3. Enable IPv6
@JoaoLages

This comment has been minimized.

Copy link

JoaoLages commented Oct 22, 2018

I report that sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' worked for me as well! Thanks a lot!! I wasnt able to install anything with pip

@infomagichand

This comment has been minimized.

Copy link

infomagichand commented Nov 8, 2018

sudo sh -c 'echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
worked great for me to!!!

@brpaz

This comment has been minimized.

Copy link

brpaz commented Nov 17, 2018

Have this problem also, not only with pip but with many HTTPS websites mostly behind Fastly CDN. Also with MEO as my ISP. Yes disable ipv6 did the trick.

Still would like to understand why this happens.

I know that before disabling ipv6, if I checked my Public IP it would give an ipv6 one. Dont really Know if its an ISP problem or if many websites cant still handle well ipv6 addresses.

@supine

This comment has been minimized.

Copy link

supine commented Nov 20, 2018

@brpaz see #5374 (comment)

@rpmcruz

This comment has been minimized.

Copy link

rpmcruz commented Dec 19, 2018

Thank you so much guys, I can confirm that only disabling IPv6 works. I have tried many things before.

@Julian

This comment has been minimized.

Copy link

Julian commented Jan 3, 2019

It's likely somewhat obvious, but will just note that this issue also affects https://pypi.org via browsers, not just pip.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment