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

--source-address option bug #4678

Closed
TheGr33k opened this issue Jan 11, 2015 · 7 comments
Closed

--source-address option bug #4678

TheGr33k opened this issue Jan 11, 2015 · 7 comments

Comments

@TheGr33k
Copy link

@TheGr33k TheGr33k commented Jan 11, 2015

youtube-dl -g -vC --source-address 209.55.52.7 https://www.youtube.com/watch?v=duKL2dAJN6I
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-g', '-vC', '--source-address', '209.55.52.7', 'https://www.youtube.com/watch?v=duKL2dAJN6I']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.10.2
[debug] Python version 2.6.6 - Linux-2.6.32-504.3.3.el6.x86_64-x86_64-with-centos-6.6-Final
[debug] exe versions: none
[debug] Proxy map: {}
[debug] Public IP address: 216.193.172.196
https://r4---sn-a5m7zne6.googlevideo.com/videoplayback?upn=m3IbFnNpT5A&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&requiressl=yes&key=yt5&itag=22&initcwndbps=2651250&mime=video%2Fmp4&fexp=900718%2C912133%2C913446%2C922243%2C927622%2C932404%2C941004%2C943917%2C947209%2C947218%2C947225%2C948124%2C950500%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201%2C957400%2C959701&dur=772.295&ms=au&id=o-AM7atmFgCrJpvx-mUugAJg8oCootzt83QJuhfnGoT6RF&mv=m&mt=1420949294&sver=3&signature=BDC585BAE73BD051CEF02E20FE902F0DF1D39F30.7ECD8D6415969A3E9448FDB155F994E82E6B9C3D&expire=1420970930&ipbits=0&ratebypass=yes&ip=216.193.172.196&source=youtube&mm=31

The ip address specified in the --source-address (i.e 209.55.52.7 ) should have been used to generate the url.Instead my main server ip is being used (216.193.172.196).

@phihag
Copy link
Contributor

@phihag phihag commented Jan 11, 2015

Thank you for the report. Unfortunately, I cannot reproduce this issue. It works fine for me, even when using the precise OS and Python version that you are using.

To be able to diagnose this problem, we therefore need more information:

  • Is --source-address being in effect at all? Try youtube-dl -Cv --source-address 1.2.3.4. If that throws an error along the lines of [Errno 99] Cannot assign requested address, then the fault is most likely in the OS/firewall configuration. If it does not, then it's likely that the bug is in youtube-dl.
  • Can you upload the output of strace somewhere? I.e. the file strace.log generated by strace -o strace.log -f youtube-dl -Cv --source-address 209.55.52.7. By looking at it (in particular the bind calls) we can determine whether your OS was correctly advised to use the source address.
  • With a pcap dump we can see whether the packets leave the OS with the correct address. Can you upload the output file log.pcap you get when you run dumpcap -a duration:5 -f 'host 95.143.172.170' -w log.pcap & youtube-dl -Cv --source-address 209.55.52.7 ?
@TheGr33k
Copy link
Author

@TheGr33k TheGr33k commented Jan 11, 2015

1.Source address seems to be in effect (as there is no " cannot assign requested address error").Moreover i use bind-ip feature in other commandline tools and there is no issue so its very unlikely that its related to server

youtube-dl -Cv --source-address 209.55.52.7
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-Cv', '--source-address', '209.95.42.7']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.10.2
[debug] Python version 2.6.6 - Linux-2.6.32-504.3.3.el6.x86_64-x86_64-with-centos-6.6-Final
[debug] exe versions: none
[debug] Proxy map: {}
[debug] Public IP address: 216.193.172.196

You want me to provide a url to youtube-dl while given these output.Also note that i modified the IPs in report for privacy reasons.If you need true server IPs you can find me on skype

@phihag
Copy link
Contributor

@phihag phihag commented Jan 11, 2015

In a private debugging session, we found out that this is a firewall/network problem unrelated to youtube-dl.

@phihag phihag closed this Jan 11, 2015
@bubbleguuum
Copy link

@bubbleguuum bubbleguuum commented Jan 17, 2015

What was the exact firewall issue and fix ? I have somewhat the same issue.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 17, 2015

@bubbleguuum That's extremely unlikely. You may be affected by #4696 though. Without the required information for bug reports, we can't really say though.

@bubbleguuum
Copy link

@bubbleguuum bubbleguuum commented Jan 17, 2015

Looks like my Ubuntu install doesn't allow binding to sources addresses:

curl --interface 209.55.52.7 yt-dl.org/ip
curl: (45) bind failed with errno 99: Cannot assign requested address

But youtube-dl doesn't complain and silently fail (real public ip redacted and replaced with 1.2.3.4):

./youtube-dl -g -Cv --source-address 209.55.52.7 https://www.youtube.com/watch?v=beszG5A7LoA
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-g', '-Cv', '--source-address', '209.55.52.7', 'https://www.youtube.com/watch?v=beszG5A7LoA']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.16
[debug] Python version 2.7.3 - Linux-3.2.0-70-generic-x86_64-with-Ubuntu-12.04-precise
[debug] exe versions: avconv 0.10.12-7, avprobe 0.10.12-7, ffmpeg 0.10.12-7, ffprobe 0.10.12-7
[debug] Proxy map: {}
[debug] Public IP address: 1.2.3.4
https://r5---sn-u2oxu-f5fs.googlevideo.com/videoplayback?sver=3&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&signature=29F47A9D18E4123F3B888FE6EE2281D28AD30742.4FE1C35B0B81EACBB37288C2A2770D754A778EA6&itag=18&upn=71KBV-JaePg&mime=video%2Fmp4&key=yt5&requiressl=yes&initcwndbps=1451250&fexp=900718%2C907263%2C912325%2C927622%2C941004%2C942622%2C943917%2C945085%2C947209%2C947225%2C948124%2C948529%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201%2C959701%2C962714&source=youtube&mt=1421491448&ratebypass=yes&dur=114.544&id=o-ADahUgjMvBE4-esDUy8agNgpEA9oCvU29G5ac0sVUrCI&mm=31&expire=1421513128&ms=au&ipbits=0&pl=24&mv=m&ip=1.2.3.4

@bubbleguuum
Copy link

@bubbleguuum bubbleguuum commented Jan 17, 2015

Hmmm it looks like I wrongly thought you could specify any ip for --source-address. But this is limited to any valid address of the machine on which youtube-dl runs. Which when you think about it, makes sense.

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.