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

All YouTube DLs start, then get [Errno 101] Network is unreachable #23188

Closed
SlidingHorn opened this issue Nov 23, 2019 · 13 comments
Closed

All YouTube DLs start, then get [Errno 101] Network is unreachable #23188

SlidingHorn opened this issue Nov 23, 2019 · 13 comments

Comments

@SlidingHorn
Copy link

@SlidingHorn SlidingHorn commented Nov 23, 2019

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2019.11.22
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v 'https://youtube.com/watch?v=J1Efz6E3_-0'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://youtube.com/watch?v=J1Efz6E3_-0']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.11.22
[debug] Python version 3.6.8 (CPython) - Linux-4.15.0-70-lowlatency-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] J1Efz6E3_-0: Downloading webpage
[youtube] J1Efz6E3_-0: Downloading video info webpage
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on 'https://r3---sn-p5qlsndr.googlevideo.com/videoplayback?expire=1574566190&ei=zqTZXdHCIo-Dir4P8OCEQA&ip=184.56.48.193&id=o-AF0mZKHkoqQp4qTm5yAnclIn-KZ8i4SzT0ApHUKuJbI5&itag=137&aitags=133%2C134%2C135%2C136%2C137%2C160%2C242%2C243%2C244%2C247%2C248%2C278&source=youtube&requiressl=yes&mm=31%2C26&mn=sn-p5qlsndr%2Csn-vgqskn76&ms=au%2Conr&mv=m&mvi=2&pl=19&initcwndbps=2086250&mime=video%2Fmp4&gir=yes&clen=2448898441&dur=16193.441&lmt=1574195288308061&mt=1574544495&fvip=6&keepalive=yes&fexp=23842630&c=WEB&txp=5535432&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=ALgxI2wwRgIhAIFGiv5qD9MVzh5WlZ7fSkbmTirw1eSCLOQTGhYoOWXqAiEA1So245WcyzZFjI6Zipmd5FM22VDrYA93ypSuo5XOs8U%3D&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRQIgHGCKXQvrB82QibRyeR-l4IA5pN6aR6Gr59pATPV4S4ICIQCdNgoNOH5lUZmSvyV4SPmzjlU2nhOuUutNq1q3WmvJ0A%3D%3D&ratebypass=yes'
[download] Destination: The Threads Converge _ Critical Role _ Campaign 2, Episode 85-J1Efz6E3_-0.f137.mp4
[download]   5.4% of 2.28GiB at 12.83MiB/s ETA 02:52ERROR: unable to download video data: <urlopen error [Errno 101] Network is unreachable>
Traceback (most recent call last):
  File "/usr/lib/python3.6/urllib/request.py", line 1318, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib/python3.6/http/client.py", line 1407, in connect
    super().connect()
  File "/usr/lib/python3.6/http/client.py", line 946, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/lib/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 1919, in process_info
    partial_success = dl(fname, new_info)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 1864, in dl
    return fd.download(name, info)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 341, in real_download
    establish_connection()
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/downloader/http.py", line 109, in establish_connection
    ctx.data = self.ydl.urlopen(request)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/YoutubeDL.py", line 2237, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python3.6/dist-packages/youtube_dl/utils.py", line 2724, in https_open
    req, **kwargs)
  File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 101] Network is unreachable>

Description

All attempts to download videos from YouTube (I haven't tried other sites...I don't use this application for anything else) start for a few seconds and then stall out. Previous similar issues are seemingly blamed on the users' internet connection, whereas I don't have any connectivity issues whatsoever. This only started happening within the last 48 hours or so.

I previously had an older version of youtube-dl, but updated to 2019.11.22 this morning, and still have this issue.

Previous suggestions seem to be:

  • set up a Caching DNS Resolver. (No idea what this is or how I would do such a thing - if it solves the issue, though, I'm more than happy to try if someone can explain it to me)
  • run youtube-dl in until loop (seems to get the job done....eventually - would like something that fixes the issue rather than a workaround that somewhat ignores the foundational problem)

I'm more than happy to provide any other troubleshooting information requested. Thanks in advance for any help you can offer. Love the project, and if I were in a position to donate/contribute to it, I certainly would, but unfortunately I'm not in that position :(

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 23, 2019

Most likely intermittent network issue on your side.

@dstftw dstftw closed this Nov 23, 2019
@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

Most likely intermittent network issue on your side.

Well like I said, I don't seem to have any connectivity issues outside of this. Do you have any suggestions on what I can do to troubleshoot or confirm this "intermittent" issue if it exists?

Appreciate your taking the time to respond 👍

Quick Edit: This is an ethernet connection, if this helps your suggestions

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 23, 2019

I don't seem to have any connectivity issues outside of this

How did you check that? Have you even run pings along with downloading to check there is no loss or Network is unreachable errors?

@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

I've run a ping -c 20 youtube.com which didn't seem to show any loss:

--- youtube.com ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19027ms
rtt min/avg/max/mdev = 29.241/30.077/31.470/0.678 ms
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 23, 2019

Have you read my message at all?

run pings along with downloading

@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

Have you read my message at all?

run pings along with downloading

I apologize if I misunderstood...If you mean trying to use youtube-dl while pinging in another terminal concurrently, yes, I have. There still is no loss reported....the Network is unreachable error still occurs in youtube-dl, but not in the ping

If I'm still misunderstanding, again, I apologize.

ping youtube.com
PING youtube.com (216.58.192.238) 56(84) bytes of data.
[clipping excessive lines]
64 bytes from ord30s26-in-f238.1e100.net (216.58.192.238): icmp_seq=158 ttl=51 time=32.1 ms
64 bytes from ord30s26-in-f238.1e100.net (216.58.192.238): icmp_seq=159 ttl=51 time=30.5 ms
64 bytes from ord30s26-in-f238.1e100.net (216.58.192.238): icmp_seq=160 ttl=51 time=31.0 ms
^C
--- youtube.com ping statistics ---
160 packets transmitted, 160 received, 0% packet loss, time 159155ms
rtt min/avg/max/mdev = 27.653/31.315/68.347/4.812 ms
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 23, 2019

You should ping host you're downloading from not youtube.com.

@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

You should ping host you're downloading from not youtube.com.

So would this be the domain that shows shows in the [debug] Invoking downloader on 'https..... line?

(Again...I apologize profusely for my ignorance here, and I greatly appreciate the fact that you're taking the time to help)

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Nov 23, 2019

Correct.

@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

Correct.

Okay...if I ping with just the domain (googlevideo.com) while attempting to download I get the following result

--- googlevideo.com ping statistics ---
316 packets transmitted, 315 received, 0% packet loss, time 315384ms
rtt min/avg/max/mdev = 25.352/33.660/78.595/8.561 ms

If I include the subdomain (r6---sn-p5qs7nel.googlevideo.com):

PING r6.sn-p5qs7nel.googlevideo.com (173.194.184.12) 56(84) bytes of data.
^C
--- r6.sn-p5qs7nel.googlevideo.com ping statistics ---
206 packets transmitted, 0 received, 100% packet loss, time 209941ms

So I guess that means I can't find the subdomain, but I don't have any clue as to where to go from that point.

@SlidingHorn
Copy link
Author

@SlidingHorn SlidingHorn commented Nov 23, 2019

I don't know if this means/indicates anything, but I ran a traceroute on the r6---sn-p5qs7nel.googlevideo.com URL, and it finds it...but it doesn't replace the --- with a . like ping seems to be doing. (ping did that whether I just entered the URL, or put it in single or double quotes)

traceroute r6---sn-p5qs7nel.googlevideo.com
traceroute to r6---sn-p5qs7nel.googlevideo.com (173.194.184.12), 30 hops max, 60 byte packets
 1  _gateway (192.168.1.1)  0.966 ms  0.939 ms  0.907 ms
 2  192.168.0.1 (192.168.0.1)  3.270 ms  2.951 ms  3.241 ms
 3  142.254.150.237 (142.254.150.237)  16.016 ms  14.845 ms  15.110 ms
 4  * * *
 5  be26.clhgohcc01r.midwest.rr.com (24.33.100.86)  22.222 ms  20.706 ms  21.864 ms
 6  be14.clevohek02r.midwest.rr.com (65.29.1.98)  23.040 ms  23.265 ms  19.393 ms
 7  be25.clevohek01r.midwest.rr.com (65.29.1.32)  22.900 ms  22.638 ms  20.551 ms
 8  bu-ether17.vinnva0510w-bcr00.tbone.rr.com (66.109.6.70)  30.959 ms  24.937 ms so-7-1-0.ar0.dca10.tbone.rr.com (66.109.6.66)  23.495 ms
 9  bu-ether11.asbnva1611w-bcr00.tbone.rr.com (66.109.6.30)  25.459 ms  23.235 ms  29.730 ms
10  66.109.5.117 (66.109.5.117)  27.035 ms  39.828 ms *
11  ix-ae-17-0.tcore1.aeq-ashburn.as6453.net (66.198.154.21)  29.081 ms  35.044 ms ix-ae-17-0.tcore2.aeq-ashburn.as6453.net (216.6.87.149)  21.932 ms
12  72.14.211.36 (72.14.211.36)  35.298 ms if-ae-2-2.tcore1.aeq-ashburn.as6453.net (216.6.87.2)  27.853 ms  36.149 ms
13  108.170.246.1 (108.170.246.1)  26.629 ms  28.080 ms 108.170.240.97 (108.170.240.97)  36.389 ms
14  108.170.229.69 (108.170.229.69)  36.368 ms  29.150 ms  21.243 ms
15  173.194.184.12 (173.194.184.12)  20.358 ms 108.170.229.67 (108.170.229.67)  22.819 ms 173.194.184.12 (173.194.184.12)  22.314 ms
@SwissCheese5
Copy link

@SwissCheese5 SwissCheese5 commented Nov 26, 2019

#23213 related I believe

@crystaler4
Copy link

@crystaler4 crystaler4 commented May 4, 2020

#23213 related I believe

Yes, it is related.

I have similar issue like @SlidingHorn. It has following symptoms:

  1. On my desktop in browser Youtube does at first 2 requests to https://r2---sn-nav85oxu-cunl.googlevideo.com/blabla (wrong) after which opens https://r2---sn-2gb7sn7r.googlevideo.com/blabla and video can be played (downloaded).

  2. YTDL (version 2020.05.03) generates link with subdomain https://r2---sn-nav85oxu-cunl.googlevideo.com/blabla (wrong) and after a while ends with [Errno 101] Network is unreachable message (76% packet loss).

  3. When I change internet provider (use mobile connection) YTDL works and downloads video from https://r2---sn-nf5o-cunl.googlevideo.com/blabla (new working subdomain).

  4. From remote device video can be downloaded with no problems. YTDL has version 2019.11.22.

  5. When I paste raw video link generated with desktop YTDL https://r2---sn-nav85oxu-cunl.googlevideo.com/blabla (wrong) directly to desktop browser it timeouts after a while. No automatic redirect from Google.

  6. When I paste raw video link generated with desktop YTDL https://r2---sn-nav85oxu-cunl.googlevideo.com/blabla (wrong) directly to remote console (wget 'link') it automatically redirects to new subdomain and downloads.

  7. redirector.googlevideo.com/blabla on desktop returns https://r2---sn-nf5o-cunl.googlevideo.com/blabla (wrong) and redirector.googlevideo.com/blabla on remote device returns https://r2---sn-cgovpm-cg9e.googlevideo.com.

  8. When I change download link (new video) on my desktop, YTDL downloads it without problems.

Video cannot be downloaded only over my primary personal IP address. Can be downloaded with new IP address or on remote device. NOTE: I have no option to test issue from another machine within same network (IP or UA issue). From Youtube-dl developer point of view, it is hard to debug (repeat issue).

I don't understand this behavior. It's only forcing me to created better downloading solution (proxing, etc) since in "account has been deleted" era I simply want my personal archive.

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