VideoCache
Videocache is no longer in development.

DOWNLOAD_ERR in Ubuntu

by Anonymous on 5 Dec 2008

Hi, I'm trying to install videocache-1.6 in Ubuntu 7.10 with squid-2.6.14 and python-2.5 . I had no trouble in installing the package. I have changed appropriate username and apache conf.d directory both in setup.py and videocache.conf . As instructed in readme, I also appended video cache config in squid.conf at the last line.

I can browse the empty directory via browser also [http://cache-address/videocache/]. But in log file I'm getting, DOWNLOAD_ERR with below messages. In tmp file of videocache, I see lots of flv files with 0 bytes. What might be the issue?

log file
--------
2008-12-05 23:54:40,825 INFO 116.90.238.9 3cd9f0afe14116df SCHEDULED YOUTUBE Video scheduled for download.
2008-12-05 23:54:43,846 INFO 116.90.238.9 3cd9f0afe14116df DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.
2008-12-05 23:55:18,972 INFO 116.90.238.9 - REQUEST - http://v12.cache.googlevideo.com/videoplayback?id=3abbff1761d5e209&itag=34&begin=0&len=604800000&ip=116.90.234.6&region=0&signature=2A88802450B142BE1E37DA744C7BD2913A3B38C9.B787C2DA6A6625128E225BB44008008AF632E862&sver=2&expire=1228522218&key=yt4&ipbits=0
2008-12-05 23:55:18,974 INFO 116.90.238.9 3abbff1761d5e209 URL_HIT YOUTUBE http://v12.cache.googlevideo.com/videoplayback?id=3abbff1761d5e209&itag=34&begin=0&len=604800000&ip=116.90.234.6&region=0&signature=2A88802450B142BE1E37DA744C7BD2913A3B38C9.B787C2DA6A6625128E225BB44008008AF632E862&sver=2&expire=1228522218&key=yt4&ipbits=0
2008-12-05 23:55:18,974 INFO 116.90.238.9 3abbff1761d5e209 CACHE_MISS YOUTUBE Requested video was not found in cache.
2008-12-05 23:55:18,976 INFO 116.90.238.9 3abbff1761d5e209 NEW_URL YOUTUBE http://v12.cache.googlevideo.com/videoplayback?id=3abbff1761d5e209&itag=34&begin=0&len=604800000&ip=116.90.234.6&region=0&signature=2A88802450B142BE1E37DA744C7BD2913A3B38C9.B787C2DA6A6625128E225BB44008008AF632E862&sver=2&expire=1228522218&key=yt4&ipbits=0
2008-12-05 23:55:19,935 INFO 116.90.238.9 3abbff1761d5e209 SCHEDULED YOUTUBE Video scheduled for download.
2008-12-05 23:55:22,955 INFO 116.90.238.9 3abbff1761d5e209 DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

With Regards
Nabin Limbu

31 Answers

by Kulbir Saini on 6 Dec 2008

Hi!

Are you sure you changed proxy and cache_host options in /etc/videocache.conf file? The second check should be that if you have allowed your proxy machine to access itself as a proxy in the squid acls?

Please check if your videocache works after correcting the above things. If it doesn't, please reply back with your /etc/videocache.conf pasted somewhere like pastebin.

Thanks for considering videocache :)

by Nabin Limbu on 8 Dec 2008

Hi,

Pls find my /etc/videocache.conf : http://nabinlimbu.pastebin.com/d5e2f21dd

I have allowed http_access for local server including my network also. I have reconfirmed in squid.conf .

Permission for /var/spool/videocache is also assigned to "proxy" user http://nabinlimbu.pastebin.com/m6a5cafd9

apparmor and iptables both are stopped.

I can browse empty directories via http://cache4.himaltech.com/videocache/

Appended lines in squid.conf are : http://nabinlimbu.pastebin.com/m5e8e3d0c

I have reloaded both squid and apache2 service.

But, I still get same error log saying DOWNLOAD_ERR in log file.

2008-12-08 18:16:28,059 INFO 79.88.4.191 - REQUEST - http://v15.cache.googlevideo.com/get_video?origin=ash-v51.ash.youtube.com&video_id=aZp2jAdBu1o&ip=202.51.86.6&signature=A74460A562C20FBAFC835272999986642C195CE2.65D1418D180CAC8837B3D9E390C174A08663361B&sver=2&start=10209&expire=1228761087&key=yt4&ipbits=0
2008-12-08 18:16:30,143 INFO 79.88.4.191 - REQUEST - http://v15.cache.googlevideo.com/get_video?origin=ash-v51.ash.youtube.com&video_id=aZp2jAdBu1o&ip=202.51.86.6&signature=2E60BF274CF068054A90A35B7AAE15447E09BC39.E3327001D68F1069C536E0997A0C1B0A1F0B9EA8&sver=2&expire=1228761089&key=yt4&ipbits=0
2008-12-08 18:16:30,305 INFO 79.88.4.191 aZp2jAdBu1o SCHEDULED YOUTUBE Video scheduled for download.
2008-12-08 18:16:32,355 INFO 79.88.4.68 - REQUEST - http://chi-v93.chi.youtube.com/get_video?video_id=KveywYdCOvM&ip=202.51.86.6&signature=0D5E7C0D26DB377CE62CB20A0319DB03393C96E6.36FE5406D56F116FB6B1D38748751FB87B9D290D&sver=2&start=3532323&expire=1228761091&key=yt4&ipbits=0
2008-12-08 18:16:33,328 INFO 79.88.4.68 KveywYdCOvM SCHEDULED YOUTUBE Video scheduled for download.
2008-12-08 18:16:33,337 INFO 79.88.4.191 aZp2jAdBu1o DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.
2008-12-08 18:16:36,374 INFO 79.88.4.68 KveywYdCOvM DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

Hoping for your kind support.

by Kulbir Saini on 8 Dec 2008

All your files look absolutely fine. Can you please contact using contact tab at the top so that we can figure out the exact problem?

by Beny on 10 Dec 2008

HI there I need help about this problem. I have problem similar as described here.
I have the same problem on Ubuntu server 8.04. I can install all the files needed but it is not working, videocache does not cache videos at all.
I have changed proxy and cache_host options in /etc/videocache.conf file.

I followed instructions in the page about needed packages, than installed them as described but it is not working at all.
I am confusing, about it I tried to install it for many many
times even I reinstalled my complet server.

by waQ on 10 Dec 2008

I have similar problem "DOWNLOAD_ERR YOUTUBE" but i was pretty sure the problem is about SELinux. i keep getting avc denials each time i played a video on youtube. i tried disabled the SELinux, and videocache works just fine. the problem is i don't know how to configure SELinux. any help please...

by Kulbir Saini on 10 Dec 2008

You are right. SELinux should be turned off for videocache to work. To permanently disable SELinux either add

setenforce 0

to your /etc/rc.local file or just disable it from GUI. Thanks for sharing the trick :)

by Kulbir Saini on 10 Dec 2008

Hi Beny,

Can you please paste your /etc/videocache.conf and /var/log/videocache/videocache.log file on pastebin? Also please check your /var/log/squid/cache.log for any python tracebacks.

Thanks for considering videocache :)

by waQ on 10 Dec 2008

hi. thanks for reply.
turning off SELinux might be bad option.
my way is to create a policy which allow denied permission using audit2allow.
further explanation can be found in man pages of audit2allow or http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385

i think mine is a success. for reference, this is content of my local.te
http://pastebin.com/m4dfb7f57

thanks :)

by Kulbir Saini on 10 Dec 2008

Hi waQ,

Thanks for the wonderful insight. I'll post about it in the main section soon :)

by joseph on 21 Dec 2008

i am getting this in squid/cache.log

008/12/21 16:48:47| WARNING: url_rewriter #1 (FD 7) exited
Exception in thread Thread-3:
Traceback (most recent call last):
  File "threading.py", line 442, in "bootstrap
    self.run()
  File "/usr/share/videocache/videocache.py", line 792, in run
    squid_part()
  File "/usr/share/videocache/videocache.py", line 529, in squid_part
    videos = video_id_pool.get()
  File "xmlrpclib.py", line 1096, in "call"
    return self."send(self."name, args)
  File "xmlrpclib.py", line 1383, in "request
    verbose=self."verbose
  File "xmlrpclib.py", line 1129, in request
    self.send_content(h, request_body)
  File "xmlrpclib.py", line 1243, in send_content
    connection.endheaders()
  File "httplib.py", line 798, in endheaders
    self._send_output()
  File "httplib.py", line 679, in _send_output
    self.send(msg)
  File "httplib.py", line 646, in send
    self.connect()
  File "httplib.py", line 630, in connect
    raise socket.error, msg
error: (111, 'Connection refused')
by Kulbir Saini on 22 Dec 2008

Hello Joseph,

Can you please try replacing your /usr/share/videocache/videocache.py file with the videocache.py python file from here? And then restart squid service.

Thanks for considering videocache :)

by Axel on 28 Dec 2008

Hi,

thank you for the download link. This seems to solute the first problem which has been pasted above.

But with the newer videocache.py I'm running into some other trouble.

2008/12/28 20:25:07| WARNING: url_rewriter #7 (FD 13) exited
2008/12/28 20:25:07| WARNING: url_rewriter #6 (FD 12) exited
2008/12/28 20:25:09| WARNING: url_rewriter #5 (FD 11) exited
2008/12/28 20:25:09| WARNING: url_rewriter #3 (FD 9) exited
2008/12/28 20:25:10| WARNING: url_rewriter #8 (FD 14) exited
2008/12/28 20:25:10| Too few url_rewriter processes are running
FATAL: The url_rewriter helpers are crashing too rapidly, need help!

Normally the first video-cache after a squid restart is successful but afterwards there only the WARNING in the log and furthermore only the FATAL.

Thank you for you efforts and you nice application!

Happy New Year!

Axel

by Kulbir Saini on 29 Dec 2008

Hi Axel,

Check for the following things

  1. SELinux - Enforcing selinux may lead to videocache misbehavior.
  2. IPTables - Make sure iptables are configured to allow port 9100 so that XMLRPC Server can be used.

Happy New Year and Happy Holidays :)

by Jamie Orzechowski on 27 Jan 2009

I have Ubuntu and the same issue

I get the following

2009-01-27 16:29:35,757 2989 66.78.98.25 6568a058e075207a SCHEDULED YOUTUBE Video scheduled for download.
2009-01-27 16:29:35,764 20222 66.78.98.25 6568a058e075207a DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

I can browse to my webserver /videocache

Permissions are set correctly for proxy.proxy on my videocache directories

any ideas??

by Anonymous on 28 Jan 2009

seems like you dont have the prpoer file/folder permission assigned..

by Kulbir Saini on 28 Jan 2009

Hi Jamie,

  1. Please check permissions of /var/spool/videocache and its subdirectories.
  2. Please check that your squid acls allow your proxy server to access internet via itself.

Thank You!

by Anonymous on 15 Jan 2010

hey admin, i cant register to your site
just trying this if i can post to even without registering

by Kulbir Saini on 15 Jan 2010

Hi!

I am sorry. Sendmail stopped working and no mails were sent. Can you please try registering now.

Thank You!

by Bill on 12 Mar 2010

2010-03-12 17:44:12,614 3603 172.17.1.9 937dc310423ed797 DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

What could be the reason?

Thank you in Advance,

Cordially,

by koichisembrano on 14 Mar 2010

Sir Kulbir,

What's the probable cause of this log? hope you don't mind and advance thanks for your reply. (")

NEW_URL YOUTUBE http://v21.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dVTVVUUV9FSkNNNV9NTlVD&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1268593200&key=yt1&signature=688EDD3E5E3F166C7DAD38309B759DD66066D51F.3C79A7F9D543ACFB8105C50FD776943C548BCD28&factor=1.25&id=ddf8a9b225efbc30
2010-03-14 20:13:46,414 1903 192.168.0.23 ddf8a9b225efbc30 DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.
by Kulbir Saini on 14 Mar 2010

Hi!

Please check this comment for details.

Thank You!

by koichisembrano on 14 Mar 2010

Sir, thank you so much for the very fast reply. Good Luck and More Power to VIDEOCACHE and most of all to YOU sir KulbiR. (",)

by Giovani on 14 Mar 2010

Hello! Do not speak English!
after several days that the cachevideos no longer doing this cache youtube!
It is giving this error in log (c3681654ecc204ad DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.)
But not all and some, the minority caches (4d92eb648e059ef5 DOWNLOAD YOUTUBE 8428891 Video was downloaded and cached.)
Where do I put (this watch #!)?
Thank you for your attention!

by Giovani.couto on 16 Mar 2010

Hello!

I'm from Brazil!

Here I have several friends who have cachevideos on their servers.
We would like to know if it will not touch your project forward, as is already the days are the problem you reported and we can not continue this dilemma not knowing what's happening!

We will have to migrate to another system of cache??

thank you for your attention!

by Kulbir Saini on 16 Mar 2010

Hi!

Its a temporary issue and I'll fix it as soon as youtube migration is complete. Youtube migration to new URL structure is still in transition.

Thank you for patience!

by Giovani.couto on 16 Mar 2010

Hi

Thank you for clarification, we will wait for your updates!

by jamso on 16 Mar 2010

hi
any solution with redtube yet ? thx

by keikurono on 16 Mar 2010

hello, do not speak much English....
I have the same problem ..
good to me sometimes occurs to me that I cached the video from youtube
and sometimes I spewing cached error:
"YOUTUBE DOWNLOAD_ERR An error occurred while retrieving the video"
there is a some solution?
greetings.

by myumet on 17 Jun 2010

I have same problem:

quested video was not found in cache.
2010-06-17 10:27:26,742 5844 192.168.0.14 2feb471c96d2565d NEW_URL YOUTUBE http://v2.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dWS1dRVl9FSkNNNl9PS1pJ&fexp=905302&algorithm=throttle-factor&itag=34&ipbits=0&burst=40&sver=3&expire=1276768800&key=yt1&signature=67DA0C467EF8D6797924E09CC7B8EB14AAEDC862.4577586A243A8A180490E8093395285394323E4E&factor=1.25&id=2feb471c96d2565d
2010-06-17 10:27:31,412 5849 192.168.0.14 2feb471c96d2565d SCHEDULED YOUTUBE Video scheduled for download.
2010-06-17 10:27:31,419 5958 192.168.0.14 2feb471c96d2565d DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

How to fix this
My OS Ubuntu 9.04 server
I use this http://ubuntuforums.org/showpost.php?p=6153907&postcount=2 configuration

by Anonymous on 22 Sep 2010

2010-03-12 17:44:12,614 3603 172.17.1.9 937dc310423ed797 DOWNLOAD_ERR YOUTUBE An error occured while retrieving the video.

What could be the reason?

Thank you in Advance,

by Kulbir Saini on 24 Sep 2010

Hi!

Please upgrade to version 1.9.6 and see if the problem persists. If so, please report back.

Thank You!