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

YouTube fails with urlopen error [Errno 111] Connection refused #18938

Closed
arschficken opened this issue Jan 21, 2019 · 4 comments
Closed

YouTube fails with urlopen error [Errno 111] Connection refused #18938

arschficken opened this issue Jan 21, 2019 · 4 comments
Labels

Comments

@arschficken
Copy link

@arschficken arschficken commented Jan 21, 2019

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.17. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

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

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • 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

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=bzD2FklTmfc']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.17
[debug] Python version 2.7.15rc1 (CPython) - Linux-4.19.0-041900rc7-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.4, ffprobe 3.4.4, phantomjs ., rtmpdump 2.4
[debug] Proxy map: {}
[youtube] bzD2FklTmfc: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 111] Connection refused> (caused by URLError(error(111, 'Connection refused'),))
  File "/home/user/bin/youtube-dl/youtube_dl/extractor/common.py", line 605, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/user/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2212, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python2.7/urllib2.py", line 429, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 447, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/home/user/bin/youtube-dl/youtube_dl/utils.py", line 1140, in https_open
    req, **kwargs)
  File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
    raise URLError(err)

Description of your issue, suggested solution and other information

Downloading from YouTube fails with Errno 111: Connection refused, even with the latest version of youtube-dl. Used to work fine on this machine with the same OS (Ubuntu 18.04), same internet connection (home ADSL, no proxy). Downloading from e.g. Vimeo works fine.

Some parameters tried that did not resolve the issue: user-agent, referer, prefer-insecure, force-ipv4.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 21, 2019

Network issue on your side.

@dstftw dstftw closed this Jan 21, 2019
@dstftw dstftw added the invalid label Jan 21, 2019
@arschficken
Copy link
Author

@arschficken arschficken commented Jan 21, 2019

You are absolutely right. This was caused by a hosts file based firewall. Fixed when I removed the rule. A more descriptive error would be useful, but it's definitely not a youtube-dl problem.

Thanks for looking into it.

@nate2014jatc
Copy link

@nate2014jatc nate2014jatc commented Jul 22, 2019

@arschficken What google server did you have blocked? I have half a dozen and I'd rather not test them all

@arschficken
Copy link
Author

@arschficken arschficken commented Jul 23, 2019

@nate2014jatc Just www.youtube.com. Good luck!

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
3 participants
You can’t perform that action at this time.