`socket.timeout: timed out` when using full IPv6 stack.
See original GitHub issueEnvironment details
- OS:
macOS 10.14.5 (18F132) Mojave
- Python version:
3.7.3
- pip version:
19.1.1
google-api-python-client
version:1.7.9
Steps to reproduce
Pre-steps:
- Have a full IPv6 stack with an IPv6 address. In my case, I have the following from Spectrum, through a Linksys WRT3200ACM router.
inet6 fe80::4ab:197d:b439:8d97%en0 prefixlen 64 secured scopeid 0x9
inet6 2604:6000:1013:a0eb:cca:87bb:d7ed:91b6 prefixlen 64 autoconf secured
inet6 2604:6000:1013:a0eb:91e1:1128:7728:8e1 prefixlen 64 autoconf temporary
Error:
- Follow the steps for the Python Quickstart (https://developers.google.com/docs/api/quickstart/python)
- run
python quickstart.py
- python exits with
socket.timeout: timed out
error
If I open System Preferences > Network > Wi-FI > Advanced > TCP/IP
and change the IPv6 configuration from Automatically
to Link-local only
, the quickstart.py properly runs.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:34 (15 by maintainers)
Top Results From Across the Web
python socket.connect -> timed out why? - Stack Overflow
From port 21 I assume it's an FTP port you're trying to open. Have you tried to connect using an FTP client to...
Read more >IPv6 connections timeout - Unix & Linux Stack Exchange
From your updated question, I can see that when Networkmanager sends out router solicitation, the router immediately responds with router ...
Read more >Is there any setting for connection timeout when IPv6 fallback ...
Hi,. 21 seconds is basically the max that any given HTTP connect can take. It's not IPv6 problem. Therefore, there is no specific...
Read more >11 Ways to Fix the ERR_CONNECTION_TIMED_OUT Error
The connection timed out error isn't a dangerous error, ... reach the user before the countdown expires, the Err connection timeout happens.
Read more >networking - ssh ipv6 - Connection timed out - Ask Ubuntu
I recently ran into this error and determined that by placing an IPv6 address within brackets causes ssh to interpret the IPv6 address...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vladignatyev - I had this error and was able to get around it by updating /etc/gai.conf to prefer IPV4 over IPV6 (uncomment the line
precedence ::ffff:0:0/96 100
).Had the same issue. I can see from a nmap that TCP ports 80 and 443 are not open on the IPv6 addresses for www.googleapis.com but they are open for IPv4 addresses:
I used the quick hack from here in my code to force the underlying socket to connect over IPv4: https://stackoverflow.com/a/50044152
It looks like a Google firewall issue