Skip to content
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

Address family not supported by protocol #11081

Closed
CrossLee1 opened this issue Oct 31, 2016 · 8 comments
Closed

Address family not supported by protocol #11081

CrossLee1 opened this issue Oct 31, 2016 · 8 comments

Comments

@CrossLee1
Copy link

@CrossLee1 CrossLee1 commented Oct 31, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.10.31

  • At least skimmed through README and most notably FAQ and BUGS sections

  • Searched the bugtracker for similar issues including closed ones

  • Bug report (encountered problems with youtube-dl)

  • Site support request (request for adding support for a new site)

  • Feature request (request for a new functionality)

  • Question

  • Other

./youtube-dl -v https://www.youtube.com/watch?v=OapMBWNgTzU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=OapMBWNgTzU']
[debug] Encodings: locale ISO-8859-1, fs ISO-8859-1, out ISO-8859-1, pref ISO-8859-1
[debug] youtube-dl version 2016.10.31
[debug] Python version 2.7.3 - Linux-2.6.32_1-15-0-0-x86_64-with-redhat-4.3-Final
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] OapMBWNgTzU: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 97] Address family not supported by protocol> (caused by URLError(error(97, 'Address family not supported by protocol'),))
File "./youtube-dl/youtube_dl/extractor/common.py", line 403, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "./youtube-dl/youtube_dl/utils.py", line 1036, in https_open
req, **kwargs)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 31, 2016

Could you try:

./youtube-dl --force-ipv4 -v https://www.youtube.com/watch?v=OapMBWNgTzU
@CrossLee1
Copy link
Author

@CrossLee1 CrossLee1 commented Oct 31, 2016

@yan12125
Thanks, I tried following your suggestion, ./youtube-dl --force-ipv4 -v https://www.youtube.com/watch?v=OapMBWNgTzU, but still got the error.

[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--force-ipv4', u'-v', u'https://www.youtube.com/watch?v=OapMBWNgTzU']
[debug] Encodings: locale ISO-8859-1, fs ISO-8859-1, out ISO-8859-1, pref ISO-8859-1
[debug] youtube-dl version 2016.10.31
[debug] Python version 2.7.3 - Linux-2.6.32_1-15-0-0-x86_64-with-redhat-4.3-Final
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] OapMBWNgTzU: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 97] Address family not supported by protocol> (caused by URLError(error(97, 'Address family not supported by protocol'),))
File "./youtube-dl/youtube_dl/extractor/common.py", line 403, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2001, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(_args)
File "./youtube-dl/youtube_dl/utils.py", line 1036, in https_open
req, *_kwargs)
File "/home/users/lifu//lib/python2.7/urllib2.py", line 1177, in do_open
raise URLError(err)

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 31, 2016

Need more information:

strace -f ./youtube-dl --force-ipv4 -v https://www.youtube.com/watch?v=OapMBWNgTzU

This command prints lots of additional information. Could you save all outputs to a file and upload it somewhere?

@CrossLee1
Copy link
Author

@CrossLee1 CrossLee1 commented Oct 31, 2016

@yan12125
Please refer to this for the outputs information.
Thanks for your help~~

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 31, 2016

Seems your DNS server is contaminated. Can you watch this video in browsers? Do you use any VPN or proxy tools?

@CrossLee1
Copy link
Author

@CrossLee1 CrossLee1 commented Oct 31, 2016

I can watch this video in browser on my Windows 7 and uses a proxy tool.
But on my server, I did not use any VPN or proxy.

I also attempted the 'youtube-dl' windows exe file, but could not download video neither.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Oct 31, 2016

Let me list what I find from your log and possible solutions:

  • Your server "cq01-rdqa-dev003.cq01.baidu.com" is provided by Baidu, a China company. I guess the server is in China. AFAIK devices in China can't access YouTube because of GFW, the Great Firewall of China
  • On your server, www.youtube.com is resolved to 93.46.8.89. According to Wikipedia (Chinese article), this IP is used by GFW to prevent people in China from accessing YouTube and other blocked sites

Above all, you need a proxy on your server, too. FYI, youtube-dl's --proxy option is useful.

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Nov 11, 2016

As there's no response for a long time, I guess the problem is already solved. Feel free to leave comments or open a new issue if there are still problems.

@yan12125 yan12125 closed this Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.