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

Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)... #18830

Closed
Crypto90 opened this issue Jan 12, 2019 · 4 comments

Comments

@Crypto90
Copy link

@Crypto90 Crypto90 commented Jan 12, 2019

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.10. 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.10

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


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 ```):

python youtube-dl -v -r 20K -4 -f 171 https://www.youtube.com/watch?v=4pTwQKMrTt0
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'-r', u'20K', u'-4', u'-f', u'171', u'http://www.youtube.com/watch?v=4pTwQKMrTt0']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.10
[debug] Python version 2.7.3 (CPython) - Linux-3.2.0-4-amd64-x86_64-with-debian-7.5
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] 4pTwQKMrTt0: Downloading webpage
[youtube] 4pTwQKMrTt0: Downloading video info webpage
[youtube] {22} signature length 43.40, html5 player vfl_235rs
[youtube] {43} signature length 43.40, html5 player vfl_235rs
[youtube] {18} signature length 43.40, html5 player vfl_235rs
[youtube] {36} signature length 43.40, html5 player vfl_235rs
[youtube] {17} signature length 43.40, html5 player vfl_235rs
[youtube] {137} signature length 43.40, html5 player vfl_235rs
[youtube] {248} signature length 43.40, html5 player vfl_235rs
[youtube] {136} signature length 43.40, html5 player vfl_235rs
[youtube] {247} signature length 43.40, html5 player vfl_235rs
[youtube] {135} signature length 43.40, html5 player vfl_235rs
[youtube] {244} signature length 43.40, html5 player vfl_235rs
[youtube] {134} signature length 43.40, html5 player vfl_235rs
[youtube] {243} signature length 43.40, html5 player vfl_235rs
[youtube] {133} signature length 43.40, html5 player vfl_235rs
[youtube] {242} signature length 43.40, html5 player vfl_235rs
[youtube] {160} signature length 43.40, html5 player vfl_235rs
[youtube] {278} signature length 43.40, html5 player vfl_235rs
[youtube] {140} signature length 43.40, html5 player vfl_235rs
[youtube] {171} signature length 43.40, html5 player vfl_235rs
[youtube] {249} signature length 43.40, html5 player vfl_235rs
[youtube] {250} signature length 43.40, html5 player vfl_235rs
[youtube] {251} signature length 43.40, html5 player vfl_235rs
[debug] Invoking downloader on u'https://r3---sn-4g5e6nsd.googlevideo.com/videoplayback?expire=1547337472&itag=171&dur=118.615&mime=audio%2Fwebm&ipbits=0&keepalive=yes&requiressl=yes&clen=1940239&lmt=1496315356985086&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&c=WEB&initcwndbps=880000&key=yt6&fvip=3&ms=au%2Crdu&id=o-ACiZN1uoDdTmxrGIgWVHxVuB_wXAylAZu_KFdcX4_Kzb&ei=oCo6XLyWG8zg1gaQkr3wAQ&mv=m&pl=20&mt=1547315689&mn=sn-4g5e6nsd%2Csn-4g5ednsk&source=youtube&mm=31%2C29&gir=yes&ip=5.231.196.147&signature=54B232DEAC01D2A293AB57E7A2E67512D4FB2902.6C4D59952CF15C1317F743C2D3861D5C0203D1F8&ratebypass=yes'
[download] Destination: Baker Cat!-4pTwQKMrTt0.webm
[download]  92.9% of 1.85MiB at 20.01KiB/s ETA 00:06
[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: Baker Cat!-4pTwQKMrTt0.webm
[download] 100% of 1.85MiB in 01:34
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

I have tested several different videos with a slow download speed enabled.
After 1-2 minutes the following error appears:

[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...

I have tried the --continue flag with no success.
This issue appears since a few days. Since yesterday it appears a lot more often.
This command got tested on 11 different linux server systems in 4 different countries.
This issue appears not on every youtube video.
As far as I saw it, it affects every youtube DL format.

If you are working with pipes (fifo), this interruption breaks the pipe and youtube-dl downloads from the beginning instead of downloading at the same position again.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 12, 2019

Connection reset by peer means remote server has terminated the connection so all questions to youtube.

@dstftw dstftw closed this Jan 12, 2019
@Crypto90
Copy link
Author

@Crypto90 Crypto90 commented Jan 12, 2019

rm test;mkfifo test;python yt -r 20K -4 -f 171 -o test http://www.youtube.com/watch?v=4pTwQKMrTt0
rm: das Entfernen von 'test' ist nicht möglich: Datei oder Verzeichnis nicht gefunden
[youtube] 4pTwQKMrTt0: Downloading webpage
[youtube] 4pTwQKMrTt0: Downloading video info webpage
[download] Destination: test
[download]  87.8% of 1.85MiB at 20.05KiB/s ETA 00:11[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 1 of 10)...
[download] Destination: test
[download]   6.8% of 1.85MiB at  2.86KiB/s ETA 10:16[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 2 of 10)...
[download] Destination: test
[download]  84.3% of 1.85MiB at 20.21KiB/s ETA 00:14[download] Got server HTTP error: [Errno 104] Connection reset by peer. Retrying (attempt 3 of 10)...

Its an issue of youtube-dl if the --continue flag does not work and the download begins from the beginning.
Any known changes sides youtube?

@Crypto90
Copy link
Author

@Crypto90 Crypto90 commented Jan 12, 2019

This issue only appears if you slow down the connection.
A fast download does work fine.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 12, 2019

You can't continue if remote party will not allow you to do so. Again: all questions on why youtube drops your connections should be addressed to youtube.
For me slow downloads works fine:

> py -3.6 .\youtube_dl\__main__.py http://www.youtube.com/watch?v=c0mX-5q3mrY -f 171 -r 10K -o test1
[youtube] c0mX-5q3mrY: Downloading webpage
[youtube] c0mX-5q3mrY: Downloading video info webpage
[download] Destination: test1
[download] 100% of 2.91MiB in 04:58
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.