youtube-dl icon indicating copy to clipboard operation
youtube-dl copied to clipboard

Address family for hostname not supported

Open vanilla38 opened this issue 11 years ago • 7 comments

Hello, since I use IPV6 with Youtube-dl (see #1020), i often got some "urlopen" errors, here's an error dump:

error

Does anyone got an idea on what it's due ? Thanks.

vanilla38 avatar Jul 30 '13 08:07 vanilla38

bump?

l29ah avatar May 28 '17 22:05 l29ah

It's because the site you are downloading from doesn't support IPv6. Yes I know here we are in 2017 and there are still a fair few big sites that don't support IPv6, Github for example and vimeo.

Just run it with the -4 option.

filterfish avatar Sep 19 '17 02:09 filterfish

Actually it looks like it's youtube-dl that doesn't support ipv6.

l29ah avatar Sep 19 '17 13:09 l29ah

It definitely supports IPv6. I'm currently downloading a video from Youtube and using lsof I can clearly see that it's using IPv6.as witnessed by this line (my ip addr redacted):

youtube-d 24476  xxx    4u  IPv6 5265671       0t0       TCP [xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:48937->[2404:6800:400d:5::b]:https (ESTABLISHED)

If you do a reverse DNS lookup on the second ip address you'll see it resolves to google.

That coupled with the fact that the URL that gave me the error message that led me to this issue was Vimeo and there is no AAAA record for vimeo but there is an A record.

So with those two pieces of evidence I think it's pretty safe to say that youtube-dl supports IPv6 and that the problem is to do with the site not supporting IPv6.

Now a better error message that would be useful, though when you know what it means it's pretty obvious!

filterfish avatar Sep 19 '17 14:09 filterfish

see also #15368

buzo-ffm avatar Feb 05 '20 18:02 buzo-ffm

error:%20Unable%20to%20download%20webpage%3A%20%3Curlopen%20error%20%5BErrno%20-9%5D%20Address%20family%20for%20hostname%20not%20supported%3E%20(caused%20by%20URLError(gaierror(-9,%20'Address%20family%20for%20hostname%20not%20supported'),))

Alexandr787 avatar Dec 18 '23 13:12 Alexandr787

Your comment is not useful without context. If you want help with the problem, please review #30839: provide a verbose log of yt-dl itself running, rather than some scrap reported by a wrapper. From above this message can occur if the site doesn't support IPv6, or if an IPv6 SOCKS proxy is specified by address, and no doubt in other cases.

dirkf avatar Dec 18 '23 17:12 dirkf